aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-v3-abi.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2002-01-20 00:09:59 +0000
committerPer Bothner <per@bothner.com>2002-01-20 00:09:59 +0000
commit98081e55d97de9b28768be80794d3f117ac4dd1e (patch)
treecc3677995efb8f9e7b72f30a805243354611c6e7 /gdb/gnu-v3-abi.c
parent20b7f9f6eb699c64f9821c831dec029b6bba9cb0 (diff)
downloadgdb-98081e55d97de9b28768be80794d3f117ac4dd1e.zip
gdb-98081e55d97de9b28768be80794d3f117ac4dd1e.tar.gz
gdb-98081e55d97de9b28768be80794d3f117ac4dd1e.tar.bz2
* gnu-v3-abi.c (gnuv3_rtti_type): Guard that vtable_symbol_name
isn't NULL, which can happen with some gcj-3.x-produced code.
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r--gdb/gnu-v3-abi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 93bc995..a4c7960 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -239,7 +239,8 @@ gnuv3_rtti_type (struct value *value,
type_info object itself to get the class name. But this way
should work just as well, and doesn't read target memory. */
vtable_symbol_name = SYMBOL_DEMANGLED_NAME (vtable_symbol);
- if (strncmp (vtable_symbol_name, "vtable for ", 11))
+ 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));
class_name = vtable_symbol_name + 11;