Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: gdb-patches@sources.redhat.com
Cc: per@bothner.com
Subject: patch to robustify gnuv3_rtti_type
Date: Sat, 19 Jan 2002 12:40:00 -0000	[thread overview]
Message-ID: <3C49D9DF.4040700@bothner.com> (raw)

[-- 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;

             reply	other threads:[~2002-01-19 20:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-19 12:40 Per Bothner [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C49D9DF.4040700@bothner.com \
    --to=per@bothner.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox