From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7269 invoked by alias); 20 Nov 2002 14:13:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7262 invoked from network); 20 Nov 2002 14:13:30 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 20 Nov 2002 14:13:30 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18EXTp-000570-00; Wed, 20 Nov 2002 10:13:33 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18EVbL-0001Bd-00; Wed, 20 Nov 2002 09:13:11 -0500 Date: Wed, 20 Nov 2002 06:13:00 -0000 From: Daniel Jacobowitz To: Richard Sharpe Cc: gdb@sources.redhat.com Subject: Re: Processing of convenience variables for scripts ... Message-ID: <20021120141310.GA4546@nevyn.them.org> Mail-Followup-To: Richard Sharpe , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-11/txt/msg00247.txt.bz2 On Wed, Nov 20, 2002 at 07:42:04PM +1030, Richard Sharpe wrote: > Hi, > > The following script does not seem to work: > > define load-ko-syms > path ./freebsd_46_i386/debug/export/kernel > set $file = linker_files.tqh_first > set $file = $file->link.tqe_next > if ($file == 0) > printf "No klds to load symbols for\n" > else > while ($file != 0) > add-symbol-file $file->filename ($file->address + > $file->text_offs) > printf "Loaded symbols for %s\n", $file->filename > set $file = $file->link.tqe_next > end > end > end > > The loop works, but add-symbol-file seems to be called without the > convenience variables being expanded. > > Have it got that right? > > If so, what would be the first step to get them expanded? add-symbol-file takes constants, not expressions - so variables are not expanded. This should probably change but it's not clear how, given the parser... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer