From 98081e55d97de9b28768be80794d3f117ac4dd1e Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Sun, 20 Jan 2002 00:09:59 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 5 +++++ gdb/gnu-v3-abi.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 761b577d92a..da3c0845031 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-01-19 Per Bothner + + * 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. + 2002-01-19 Jason Thorpe * alpha-tdep.c (alpha_register_virtual_type): New function. diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 93bc9950ee8..a4c79605000 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; -- 2.30.2