This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: arguments to add-symbol-file
Kevin Buettner writes:
> On Mar 23, 6:03pm, Elena Zannoni wrote:
>
> > Why when we use
> >
> > add-symbol-file <file> 0x1000 0x2000 0x3000
> >
> > gdb ends up with the following addrs structure, which includes explicit
> > entries for .text, .data, and .bss section, plus the same 3 entries
> > repeated in the 'other' array?
> >
> > Would it make sense to have only the 'other' part, or not include
> > those three in 'other'?
>
> I think it'd make sense to only have the `other' part.
>
> BTW, did you notice the following comment from symfile.h?
>
> /* Add the section to the others even if it is a
> text data or bss section. This is redundent but
> eventually, none will be given special treatment */
>
And this one in symfile.c:
/* FIXME: These sections will not need special treatment because ALL
sections are in the other sections table */
All the relevant code is structured like this:
if ( this is .text )
do something
if ( this is .data )
do something
if ( this is .bss )
do something
for ( all in others )
do something
Where 'something' is pretty much the same set of instructions.
> I think you should ask Fred about it. (There's probably some reason
> why it'll be non-trivial to fix.)
>
Yes, that's why I was puzzled.
> Kevin
Elena