diff options
author | Jason Merrill <jason@redhat.com> | 2002-05-03 19:38:29 +0000 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2002-05-03 19:38:29 +0000 |
commit | f773fdbbd54fd351c6dbcb30d6e4a24c95cc2c8b (patch) | |
tree | b5563bdddfb9d3a1d056b522cf436e3e27f9c8ca /gdb | |
parent | 8f5b2891d8f017acb67b8f04dcf38e08a9d1c326 (diff) | |
download | gdb-f773fdbbd54fd351c6dbcb30d6e4a24c95cc2c8b.zip gdb-f773fdbbd54fd351c6dbcb30d6e4a24c95cc2c8b.tar.gz gdb-f773fdbbd54fd351c6dbcb30d6e4a24c95cc2c8b.tar.bz2 |
* gnu-v3-abi.c (gnuv3_rtti_type): If we get confused, just warn
and return NULL.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gnu-v3-abi.c | 21 |
2 files changed, 21 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88d38de7..6340748 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-05-03 Jason Merrill <jason@redhat.com> + + * gnu-v3-abi.c (gnuv3_rtti_type): If we get confused, just warn + and return NULL. + 2002-05-03 Michal Ludvig <mludvig@suse.cz> * x86-64-tdep.c (x86_64_dwarf2gdb_regno_map), diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index ae2104d..720364b 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -241,22 +241,33 @@ gnuv3_rtti_type (struct value *value, vtable_symbol_name = SYMBOL_DEMANGLED_NAME (vtable_symbol); if (vtable_symbol_name == NULL || strncmp (vtable_symbol_name, "vtable for ", 11)) - error ("can't find linker symbol for virtual table for `%s' value", - TYPE_NAME (value_type)); + { + warning ("can't find linker symbol for virtual table for `%s' value", + TYPE_NAME (value_type)); + if (vtable_symbol_name) + warning (" found `%s' instead", vtable_symbol_name); + return NULL; + } class_name = vtable_symbol_name + 11; /* Try to look up the class name as a type name. */ class_symbol = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0, 0); if (! class_symbol) - error ("can't find class named `%s', as given by C++ RTTI", class_name); + { + warning ("can't find class named `%s', as given by C++ RTTI", class_name); + return NULL; + } /* Make sure the type symbol is sane. (An earlier version of this code would find constructor functions, who have the same name as the class.) */ if (SYMBOL_CLASS (class_symbol) != LOC_TYPEDEF || TYPE_CODE (SYMBOL_TYPE (class_symbol)) != TYPE_CODE_CLASS) - error ("C++ RTTI gives a class name of `%s', but that isn't a type name", - class_name); + { + warning ("C++ RTTI gives a class name of `%s', but that isn't a type name", + class_name); + return NULL; + } /* This is the object's run-time type! */ run_time_type = SYMBOL_TYPE (class_symbol); |