This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb 5.0 "ia64-unknown-linux" segv error
- To: gjertsen at us dot ibm dot com, Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: gdb 5.0 "ia64-unknown-linux" segv error
- From: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Date: Sat, 9 Dec 2000 15:33:17 -0800 (PST)
- Cc: gdb at sources dot redhat dot com, bug-gdb at gnu dot org
- References: <852569AF.0071239B.00@d54mta01.raleigh.ibm.com>
kevinb writes:
> <1><96d50>: Abbrev Number: 12 (DW_TAG_typedef)
> DW_AT_name : ulong
> DW_AT_decl_file : 12
> DW_AT_decl_line : 59
> DW_AT_type : <96d50>
>
>I'm not a DWARF2 expert, but it looks to me like the above is a
>self referential typedef. This would explain why you're seeing
>the infinite recursion in dwarf2read.c.
Yes, it is a bug. This is not correct dwarf2.
I was going to say it was 'illegal' dwarf2, but the spec
does not quite allow me to say that:
the spec:
.H 2 "Typedef Entries"
.IX typedefs
Any arbitrary type named via a typedef is represented
by a debugging information entry with the tag
.Cf DW_TAG_typedef .
The typedef entry has a
.Cf DW_AT_name
attribute whose value is a null-terminated
string containing the name of the typedef as it appears in the
source program.
The typedef entry also contains a
.Cf DW_AT_type
attribute.
The above is the same in the latest draft dwarf2 spec.
It is clear from context though, that the DW_AT_type
should be a reference to 'the type the ulong name refers to'
in the example at hand.
davea@sgi.com