On Wed, 09 May 2012 14:30:52 -0600, Tom Tromey <
tromey@...> wrote:
>>>>>> "Tomasz" == Tomasz Grobelny <
tomasz@...>
writes:
>
> tomasz> Die: DW_TAG_<unknown> (abbrev 8, offset 0x199)
> [...]
> Tomasz> Dwarf Error: Cannot find type of die [in module
> /login/sg209371/a.out]
>
> Tomasz> This time this is gdb 7.0.1.
>
> Tomasz> The question is indeed whether the issue is on compiler side or
> Tomasz> gdb side. The comments from the link you mentioned are from
> Tomasz> 2007, I would think that Oracle is capable of fixing a bug in 5
> Tomasz> years... Also the dwarfdump shows some sensible information
> Tomasz> (some symbols, names of the source files).
>
> This kind of question can't be answered without more information.
>
I will be happy to provide it (but only for the next two weeks as I will
lose access to those solaris machines later).
> It could be a compiler bug, or a gdb bug, or a disagreement about the
> interpretation of DWARF.
>
I cannot tell...
> If you have a small test case, a dump of the DWARF information might
> prove helpful. If you only have a large test case, then something more
> selective could help.
>
A trivial test case attached. Compiled with:
CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
> For example, in the above you could examine the DWARF for DIE 0x199.
> gdb just says DW_TAG_<unknown>, which isn't very helpful... but
> presumably the platform DWARF dumper would do better.
>
I used dwarfdump from the same directory as the compiler.
But still the most important question for me is: is it supposed to work? I
understand that there may be bugs on either side, but does the general
design of dwarf format/compiler/gdb allow for debugging code generated with
sun studio compiler using gdb?
--
Regards,
Tomasz Grobelny