This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: add-symbol-file parsing


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]