From 56953f802daf2dc7b932932e47d40acedf8f7f3e Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 8 Apr 2008 22:09:20 +0000 Subject: * stabsread.c (cleanup_undefined_types_noname): Manually set the instance flags of the undefined type before calling replace_type. --- gdb/ChangeLog | 5 +++++ gdb/stabsread.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6718f6ddec9..6058b95939c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-04-08 Joel Brobecker + + * stabsread.c (cleanup_undefined_types_noname): Manually set the + instance flags of the undefined type before calling replace_type. + 2008-04-08 Vladimir Prus * target.h (enum strata): Remove the download_stratum. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 8e88ea2dcbb..3b747b45bd4 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; -- cgit v1.2.1