aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-04-08 22:09:20 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-04-08 22:09:20 +0000
commit56953f802daf2dc7b932932e47d40acedf8f7f3e (patch)
treecb3476d6ba132548e1d81428d45245383e85bea6 /gdb/stabsread.c
parent780e49c563bcac5d4dcb4e74ba877ead274d022d (diff)
downloadgdb-56953f802daf2dc7b932932e47d40acedf8f7f3e.zip
gdb-56953f802daf2dc7b932932e47d40acedf8f7f3e.tar.gz
gdb-56953f802daf2dc7b932932e47d40acedf8f7f3e.tar.bz2
* stabsread.c (cleanup_undefined_types_noname): Manually set the
instance flags of the undefined type before calling replace_type.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 8e88ea2..3b747b4 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -4266,7 +4266,14 @@ cleanup_undefined_types_noname (void)
type = dbx_lookup_type (nat.typenums);
if (nat.type != *type && TYPE_CODE (*type) != TYPE_CODE_UNDEF)
- replace_type (nat.type, *type);
+ {
+ /* The instance flags of the undefined type are still unset,
+ and needs to be copied over from the reference type.
+ Since replace_type expects them to be identical, we need
+ to set these flags manually before hand. */
+ TYPE_INSTANCE_FLAGS (nat.type) = TYPE_INSTANCE_FLAGS (*type);
+ replace_type (nat.type, *type);
+ }
}
noname_undefs_length = 0;