This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: add-symbol-file parsing
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Mark Santcroos <marks at ripe dot net>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 3 Dec 2002 00:29:39 -0500
- Subject: Re: add-symbol-file parsing
- References: <20021129105448.GF598@laptop.6bone.nl>
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