This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Strange error message from gdb
Daniel Jacobowitz writes:
> On Wed, Dec 19, 2007 at 05:54:10PM +0000, Andrew Haley wrote:
> > > That DIE doesn't have any content. It says "I am a declartion of an
> > > interface". But not which interface or what it's called or what the
> > > type is.
> >
> > Well, the type is the interface: there's nothing else it might be.
>
> >From the DWARF standard:
>
> Interface types are represented by debugging information entries with
> the tag DW_TAG_interface_type.
>
> An interface type entry has a DW_AT_name attribute, whose value is a
> null-terminated string containing the type name as it appears in the
> source program.
>
> The members of an interface are represented by debugging information
> entries that are owned by the interface type entry and that appear in
> the same order as the corresponding declarations in the source
> program.
OK, so the name is missing, and that's wrong. I should find out why.
> So this is a declaration of an interface, but without a name. GDB is
> doing the wrong thing with it, but it still seems wrong to me. Or do
> Java interfaces have no name?
>
> > Anyway, on inspection it seems like read_type_die() in dwarf2read.c
> > doesn't know how to handle DW_TAG_interface_type. This is rather odd,
> > given that dwarf_tag_name() does know about interface types.
>
> That's just a complete transcription of the DWARF tags (at some point
> in history).
Right, so read_type_die() doesn't know how to handle
DW_TAG_interface_type. The weird thing is that I have never seen this
error mesage before today, and AFAIAA gcj has been generating these
interface types for a long while.
It seems to me that even if gcj did generate the name for the
interface, gdb would still die because it doesn't have any handlers
for DW_TAG_interface_type in dwarf2read.c
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903