From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26053 invoked by alias); 6 Apr 2007 18:52:03 -0000 Received: (qmail 26043 invoked by uid 22791); 6 Apr 2007 18:52:02 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.palmsource.com (HELO mx1.palmsource.com) (12.7.175.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Apr 2007 19:52:00 +0100 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id 007AE5F04A; Fri, 6 Apr 2007 11:51:59 -0700 (PDT) Received: from mx1.palmsource.com ([127.0.0.1]) by localhost (mx1.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17951-04-6; Fri, 6 Apr 2007 11:51:58 -0700 (PDT) Received: from ussunex03.svl.access-company.com (ussunm001.palmsource.com [192.168.101.12]) by mx1.palmsource.com (Postfix) with ESMTP id EC2AB5EEB7; Fri, 6 Apr 2007 11:51:57 -0700 (PDT) Received: from 192.168.92.56 ([192.168.92.56]) by ussunex03.svl.access-company.com ([192.168.101.12]) via Exchange Front-End Server owa.access-company.com ([10.0.20.19]) with Microsoft Exchange Server HTTP-DAV ; Fri, 6 Apr 2007 18:53:21 +0000 Received: from svmsnyderlnx by owa.access-company.com; 06 Apr 2007 11:51:59 -0700 Subject: Re: access variables in canned command sequences From: Michael Snyder To: vb Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 06 Apr 2007 18:52:00 -0000 Message-Id: <1175885519.11945.64.camel@svmsnyderlnx.palmsource.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00038.txt.bz2 On Fri, 2007-04-06 at 11:26 -0700, vb wrote: > Hello all, > > I need to be able pass a convenience variable defined in gdb command > file to a shell script from inside a canned sequence, something like > this: > > set $offs=0x1ff80000 > define xyz > shell echo offset is $offs > end > > what happens when I run it - the parameter does not get passed to the > shell at all: > > (gdb) xyz > offset is > (gdb) > > > What gives?! I imagine that the command "echo offset is $offs" is passed directly to the shell. The shell doesn't have a variable $offs, so nothing gets printed. I'm not sure how to work around this.