diff options
author | Daniel Jacobowitz <dan@debian.org> | 2006-10-09 19:28:14 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2006-10-09 19:28:14 +0000 |
commit | f9dde0a9db7d3c38f81198f6622171cd1405a270 (patch) | |
tree | 0c7896ee2a70b87681ca956b87057f2ab49c5ebf /gdb/valops.c | |
parent | 0b2e9d472050470b67c1079316225a467b233d15 (diff) | |
download | gdb-f9dde0a9db7d3c38f81198f6622171cd1405a270.tar.gz |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 7d1b7d83e70..15c407c0af2 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; |