This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: c++/2116: gdb crashes when calling "C" function from "C++" code
- From: Paul Pluzhnikov <ppluzhnikov at charter dot net>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 26 May 2006 16:58:02 -0000
- Subject: Re: c++/2116: gdb crashes when calling "C" function from "C++" code
- Reply-to: Paul Pluzhnikov <ppluzhnikov at charter dot net>
The following reply was made to PR c++/2116; it has been noted by GNATS.
From: Paul Pluzhnikov <ppluzhnikov@charter.net>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: c++/2116: gdb crashes when calling "C" function from "C++" code
Date: Fri, 26 May 2006 09:52:02 -0700
Here is a trivial patch for this crash:
$ diff -u gdb/valops.c.orig gdb/valops.c
--- gdb/valops.c.orig 2005-05-26 21:39:32.000000000 -0700
+++ gdb/valops.c 2006-05-26 09:49:59.026107248 -0700
@@ -1847,7 +1847,8 @@
else
{
const char *qualified_name = SYMBOL_CPLUS_DEMANGLED_NAME (fsym);
- func_name = cp_func_name (qualified_name);
+ if (qualified_name)
+ func_name = cp_func_name (qualified_name);
/* If the name is NULL this must be a C-style function.
Just return the same symbol. */