gdb/gdb-6.3-dwattype0-20050201.patch

25 lines
932 B
Diff
Raw Normal View History

2005-02-01 Jeff Johnston <jjohnstn@redhat.com>
* dwarf2read.c (die_type): Tolerate a type reference to location
<0> and treat as unknown type.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
===================================================================
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c 2008-02-22 08:10:39.000000000 +0100
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c 2008-02-22 08:17:56.000000000 +0100
@@ -7634,6 +7634,10 @@ die_type (struct die_info *die, struct d
/* A missing DW_AT_type represents a void type. */
return builtin_type (current_gdbarch)->builtin_void;
}
+ else if (DW_ADDR (type_attr) == 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);