GDB (mis)behavior depends on DWARF DW_TAG_compile_unit data
Maxim Grigoriev
maxim@tensilica.com
Mon Mar 12 21:54:00 GMT 2007
Now I'm getting convinced more and more that this is Tensilica
compiler's problem.
It could be not that trivial as I thought in the beginning. I didn't
actually compare executables
from different compilers running them under latests GDB's control.
Instead, I was comparing
DWARF data, specifically, "DWARF DW_TAG_compile_unit" tag. That's why I
missed
the point that Xtensa-specific GDB misbehavior has nothing to do with
"DWARF DW_TAG_compile_unit"
entry ( which looks the same across all the compilers ). It has to be
something else.
Let me find out what it is and get back to you with my conclusions. It's
still can be
important for GDB in terms of better handling bad DWARF data.
Thanks much for your valuable input on this. It really helps.
-- Maxim
Joel Brobecker wrote:
>> If you think it's a generic GDB problem I can fix it. I have to fix it
>> anyway on Xtensa GDB. I don't see how it can be Xtensa-specific.
>> Xtensa GCC compiler DWARF is consistent with native GCC 4.1.1 compiler
>> on my Linux box. So if this is a compiler problem ( which I doubt )
>> it seems to be pretty generic.
>>
>
> With the information you have given us, all I can say is that GDB
> should be able to handle the situation, so we do have a bug somewhere.
> Whether it is in GCC or GDB is still an open question as far as I can
> tell.
>
> Have you checked the line-table as well in both cases? There is
> a very convenient command that gives you the list of lines known
> by GDB for any given file: -symbol-list-lines. It's a MI command,
> but you should be able to use it from the GDB prompt using
> "interpreter-exe mi -symbol-list-lines" followed by the filename.
>
>
More information about the Gdb
mailing list