Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.130 diff -u -p -r1.130 dwarf2read.c --- dwarf2read.c 28 Jan 2004 18:43:06 -0000 1.130 +++ dwarf2read.c 19 Feb 2004 13:58:42 -0000 @@ -3077,6 +3077,9 @@ read_structure_scope (struct die_info *d TYPE_LENGTH (type) = 0; } + if (dwarf2_attr (die, DW_AT_declaration, cu) != NULL) + 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. */ @@ -3213,11 +3216,6 @@ read_structure_scope (struct die_info *d new_symbol (die, type, cu); do_cleanups (back_to); - } - else - { - /* No children, must be stub. */ - TYPE_FLAGS (type) |= TYPE_FLAG_STUB; } processing_current_prefix = previous_prefix;