* dwarf2read.c (read_structure_scope): Identify stub types
authorJoel Brobecker <brobecker@gnat.com>
Fri, 16 Apr 2004 03:17:25 +0000 (03:17 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 16 Apr 2004 03:17:25 +0000 (03:17 +0000)
        using die_is_declaration() only.

gdb/ChangeLog
gdb/dwarf2read.c

index 1caf6d214b0148b946f8affa828b70a8a625506f..18612817bf922ffd1aed4f6cadd45600543aa7a3 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-15  Joel Brobecker  <brobecker@gnat.com>
+
+       * dwarf2read.c (read_structure_scope): Identify stub types
+       using die_is_declaration() only.
+
 2004-04-15  Roland McGrath  <roland@redhat.com>
 
        * symfile.c (symbol_file_add_with_addrs_or_offsets): Take ABFD as
index df60474eb6cb9588240469be3c5c40100371c0da..09b0cc51c7b34301fa6f046bda922eab48119a44 100644 (file)
@@ -3141,6 +3141,9 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
       TYPE_LENGTH (type) = 0;
     }
 
+  if (die_is_declaration (die, cu))
+    TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
+
   /* We need to add the type field to the die immediately so we don't
      infinitely recurse when dealing with pointers to the structure
      type within the structure itself. */
@@ -3237,11 +3240,6 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
 
       do_cleanups (back_to);
     }
-  else
-    {
-      /* No children, must be stub. */
-      TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
-    }
 
   processing_current_prefix = previous_prefix;
   if (back_to != NULL)