gdb/gdb-6.3-dwattype0-20050201.patch
Jeff Johnston 020264b153 - Tolerate DW_AT_type referencing <0> and instead of generating an error,
treat as unknown type.
- Bugzilla 144852.
2005-02-05 03:49:11 +00:00

19 lines
702 B
Diff

2005-02-01 Jeff Johnston <jjohnstn@redhat.com>
* dwarf2read.c (die_type): Tolerate a type reference to location
<0> and treat as unknown type.
--- gdb-6.3/gdb/dwarf2read.c.fix Tue Feb 1 16:48:49 2005
+++ gdb-6.3/gdb/dwarf2read.c Tue Feb 1 16:50:12 2005
@@ -7120,6 +7120,10 @@ die_type (struct die_info *die, struct d
/* A missing DW_AT_type represents a void type. */
return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu);
}
+ else if (type_attr->u.unsnd == 0)
+ /* If we have an invalid reference to 0, ignore it and treat
+ the type as unknown. */
+ return builtin_type_error;
else
type_die = follow_die_ref (die, type_attr, cu);