aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-04-16 03:17:25 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-04-16 03:17:25 +0000
commitdc718098ad86059b07d50687186c77bbf843d116 (patch)
tree6385adca9cae24a201c3ba95e06976cbb79496be /gdb/dwarf2read.c
parentf4c724fc32c913252cfda9ce052ad84afe3258b6 (diff)
downloadfsf-binutils-gdb-dc718098ad86059b07d50687186c77bbf843d116.zip
fsf-binutils-gdb-dc718098ad86059b07d50687186c77bbf843d116.tar.gz
fsf-binutils-gdb-dc718098ad86059b07d50687186c77bbf843d116.tar.bz2
* dwarf2read.c (read_structure_scope): Identify stub types
using die_is_declaration() only.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index df60474..09b0cc5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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)