aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 7fff68a..622ddd3 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -55,6 +55,7 @@
#include "gdb_stat.h"
#include <ctype.h>
#include "cp-abi.h"
+#include "cp-support.h"
#include "observer.h"
#include "gdb_assert.h"
#include "solist.h"
@@ -1213,6 +1214,17 @@ lookup_symbol_in_language (const char *name, const struct block *block,
modified_name = demangled_name;
make_cleanup (xfree, demangled_name);
}
+ else
+ {
+ /* If we were given a non-mangled name, canonicalize it
+ according to the language (so far only for C++). */
+ demangled_name = cp_canonicalize_string (name);
+ if (demangled_name)
+ {
+ modified_name = demangled_name;
+ make_cleanup (xfree, demangled_name);
+ }
+ }
}
else if (lang == language_java)
{