diff options
author | Doug Evans <dje@google.com> | 2015-05-26 17:20:49 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2015-05-26 17:20:49 -0700 |
commit | 82c7be3106bbbf753f441f8a8113f2cac5e7cba8 (patch) | |
tree | 19fbdd4d6c5542866f785b664396711a5d4240a7 /gdb/cp-support.c | |
parent | 04e40a033b6aab98f6ecf4bdb0cb7101f25fba27 (diff) | |
download | gdb-82c7be3106bbbf753f441f8a8113f2cac5e7cba8.zip gdb-82c7be3106bbbf753f441f8a8113f2cac5e7cba8.tar.gz gdb-82c7be3106bbbf753f441f8a8113f2cac5e7cba8.tar.bz2 |
PR c++/18141, c++/18417.
gdb/ChangeLog:
* cp-support.c (cp_lookup_rtti_type): Handle the case of NAME being
a typedef.
gdb/testsuite/ChangeLog:
* gdb.cp/iostream.cc: New file.
* gdb.cp/iostream.exp: New file.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r-- | gdb/cp-support.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 4bbee94..3db9751 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -1453,7 +1453,9 @@ cp_lookup_rtti_type (const char *name, struct block *block) struct symbol * rtti_sym; struct type * rtti_type; - rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL); + /* Use VAR_DOMAIN here as NAME may be a typedef. PR 18141, 18417. + Classes "live" in both STRUCT_DOMAIN and VAR_DOMAIN. */ + rtti_sym = lookup_symbol (name, block, VAR_DOMAIN, NULL); if (rtti_sym == NULL) { @@ -1467,7 +1469,7 @@ cp_lookup_rtti_type (const char *name, struct block *block) return NULL; } - rtti_type = SYMBOL_TYPE (rtti_sym); + rtti_type = check_typedef (SYMBOL_TYPE (rtti_sym)); switch (TYPE_CODE (rtti_type)) { |