This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/2116: gdb crashes when calling "C" function from "C++" code


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. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]