aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-10-09 19:28:14 +0000
committerDaniel Jacobowitz <drow@false.org>2006-10-09 19:28:14 +0000
commitd9639e132982392ca2d53802e571db5afe274e61 (patch)
tree5e56d0a3ec9d2334a05ea338dee43b0f910db967 /gdb/valops.c
parentd5aff968a1623e503e61cb8d5d163a94b7647768 (diff)
downloadfsf-binutils-gdb-d9639e132982392ca2d53802e571db5afe274e61.zip
fsf-binutils-gdb-d9639e132982392ca2d53802e571db5afe274e61.tar.gz
fsf-binutils-gdb-d9639e132982392ca2d53802e571db5afe274e61.tar.bz2
2006-10-09 Paul Pluzhnikov <ppluzhnikov@charter.net>
PR c++/2116 * valops.c (find_overload_match): Check for a NULL name. 2006-10-09 Daniel Jacobowitz <dan@codesourcery.com> PR c++/2116 * gdb.cp/call-c.cc, gdb.cp/call-c.exp, gdb.cp/call-c-1.c: New.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 7d1b7d8..15c407c 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1889,10 +1889,15 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method,
else
{
const char *qualified_name = SYMBOL_CPLUS_DEMANGLED_NAME (fsym);
- func_name = cp_func_name (qualified_name);
- /* If the name is NULL this must be a C-style function.
- Just return the same symbol. */
+ /* If we have a C++ name, try to extract just the function
+ part. */
+ if (qualified_name)
+ func_name = cp_func_name (qualified_name);
+
+ /* If there was no C++ name, this must be a C-style function.
+ Just return the same symbol. Do the same if cp_func_name
+ fails for some reason. */
if (func_name == NULL)
{
*symp = fsym;