020264b
2005-02-01  Jeff Johnston  <jjohnstn@redhat.com>
020264b
020264b
        * dwarf2read.c (die_type): Tolerate a type reference to location
020264b
        <0> and treat as unknown type.
020264b
25ff8a1
2008-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
25ff8a1
25ff8a1
	Port to GDB-6.8pre.
25ff8a1
25ff8a1
Index: gdb-6.8cvs20080219/gdb/dwarf2read.c
25ff8a1
===================================================================
25ff8a1
--- gdb-6.8cvs20080219.orig/gdb/dwarf2read.c	2008-02-22 08:10:39.000000000 +0100
25ff8a1
+++ gdb-6.8cvs20080219/gdb/dwarf2read.c	2008-02-22 08:17:56.000000000 +0100
25ff8a1
@@ -7634,6 +7634,10 @@ die_type (struct die_info *die, struct d
020264b
       /* A missing DW_AT_type represents a void type.  */
25ff8a1
       return builtin_type (current_gdbarch)->builtin_void;
020264b
     }
367b952
+  else if (DW_ADDR (type_attr) == 0)
020264b
+    /* If we have an invalid reference to 0, ignore it and treat
020264b
+       the type as unknown.  */
020264b
+    return builtin_type_error;
020264b
   else
020264b
     type_die = follow_die_ref (die, type_attr, cu);
020264b