Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* patch to robustify gnuv3_rtti_type
@ 2002-01-19 12:40 Per Bothner
  2002-01-19 15:38 ` Daniel Jacobowitz
  2002-01-19 17:50 ` Daniel Jacobowitz
  0 siblings, 2 replies; 9+ messages in thread
From: Per Bothner @ 2002-01-19 12:40 UTC (permalink / raw)
  To: gdb-patches; +Cc: per

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

Ok to check in?  This doesn't fix the real problem, which is that
gcj produces vtables that aren't properly abi-compliant.  Hopefully,
we'll fix that.  But for now, let's at least prevent gdb from crashing.

	* gnu-v3-abi.c (gnuv3_rtti_type):  Guard that vtable_symbol_name
	isn't NULL, which can happen with some gcj3.0-produced code.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/

[-- Attachment #2: rtti.patch --]
[-- Type: text/plain, Size: 777 bytes --]

Index: gnu-v3-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v3-abi.c,v
retrieving revision 1.6
diff -u -r1.6 gnu-v3-abi.c
--- gnu-v3-abi.c	2002/01/04 18:20:19	1.6
+++ gnu-v3-abi.c	2002/01/19 20:33:49
@@ -239,7 +239,8 @@
      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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-01-21  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-19 12:40 patch to robustify gnuv3_rtti_type Per Bothner
2002-01-19 15:38 ` Daniel Jacobowitz
2002-01-19 16:15   ` Per Bothner
2002-01-19 16:19     ` Daniel Jacobowitz
2002-01-20 12:43       ` Per Bothner
2002-01-20 12:54         ` Daniel Jacobowitz
2002-01-20 16:00           ` Per Bothner
2002-01-20 14:24         ` Daniel Berlin
2002-01-19 17:50 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox