Wrong source location in symbols

Fabian Cenedese Cenedese@indel.ch
Mon Dec 11 16:49:00 GMT 2006


At 08:41 11.12.2006 -0500, Daniel Jacobowitz wrote:
>On Mon, Dec 11, 2006 at 11:14:52AM +0100, Fabian Cenedese wrote:
>> No matter where they are defined, the symbols get as location the (wrong)
>> file write.c, so the last valid file from the .text section. I tried with both
>> -gstabs or -gdwarf-2, but that didn't change anything. I also tried with
>> forward and back slashes in the paths of the compiled files, no luck.
>> 
>> Where's the code in gdb that would set these locations?
>
>In symtab.c.  If you can build a relatively small testcase, we can
>investigate.

It's not that easy to write a little sample. It may well be the used libs
or the whole tool-chain. That's why I try to find it myself.

I couldn't quite make out in symtab.c a place where the filenames
get set. But I saw in elfread.c, elf_symtab_read that quite some
minsyms got the filename write.c set though they are not in this
source file. I'll see what else I can find.

bye  Fabi




More information about the Gdb mailing list