From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12440 invoked by alias); 3 Dec 2002 05:43:51 -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 12433 invoked from network); 3 Dec 2002 05:43:50 -0000 Received: from unknown (HELO ns.aus.com) (66.127.241.71) by sources.redhat.com with SMTP; 3 Dec 2002 05:43:50 -0000 Received: from localhost (rsharpe@localhost) by ns.aus.com (8.11.6/8.11.6) with ESMTP id gB369Ks16684; Mon, 2 Dec 2002 22:09:21 -0800 X-Authentication-Warning: ns.aus.com: rsharpe owned process doing -bs Date: Mon, 02 Dec 2002 21:43:00 -0000 From: Richard Sharpe X-X-Sender: To: Daniel Jacobowitz cc: Mark Santcroos , Subject: Re: add-symbol-file parsing In-Reply-To: <20021203052939.GA22983@nevyn.them.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-12/txt/msg00039.txt.bz2 On Tue, 3 Dec 2002, Daniel Jacobowitz wrote: > 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? I would love to be able to use convenience variables for the file name and the text_addr. I started looking at it in 5.2.1, but quickly got bogged down in a twisty maze of code. Regards ----- Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com