From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8595 invoked by alias); 3 Dec 2002 05:29:17 -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 8588 invoked from network); 3 Dec 2002 05:29:16 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 3 Dec 2002 05:29:16 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18J7Uu-0004Yn-00; Tue, 03 Dec 2002 01:29:36 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18J5cp-00060D-00; Tue, 03 Dec 2002 00:29:39 -0500 Date: Mon, 02 Dec 2002 21:29:00 -0000 From: Daniel Jacobowitz To: Mark Santcroos Cc: gdb@sources.redhat.com Subject: Re: add-symbol-file parsing Message-ID: <20021203052939.GA22983@nevyn.them.org> Mail-Followup-To: Mark Santcroos , gdb@sources.redhat.com References: <20021129105448.GF598@laptop.6bone.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021129105448.GF598@laptop.6bone.nl> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00038.txt.bz2 On Fri, Nov 29, 2002 at 11:54:48AM +0100, Mark Santcroos wrote: > Unlike the documentation says the 'address' argument to 'add-symbol-file' > is not parsed as an expression but directly as an address. > > The following commands ... > > (gdb) set $text_addr = 0xdeadc0de > (gdb) add-symbol-file /dir/symbol.file $text_addr > > .. will end up setting the address to 0 by strtoul down in the code path. > > The above will therefor not work. Is there another way I can achieve this? > > If this is not possible (in another way) will patches be accepted to make > this an expression? The problem is, add-symbol-file takes more than a $text_addr. It also takes a series of -s SECNAME $sec_addr. We could: - split the command line at -s options and parse anything before the next -s option as an expression, assuming people will not foolishly use -s in their expression; - allow only convenience variables Option 2 may be the way to go... What do others think about allowing integer-or-convenience-variable there? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer