forked from Imagelibrary/binutils-gdb
gdb
2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Keith Seitz <keiths@redhat.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/6817 * Makefile.in (dbxread.o): Update. * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string. * dwarf2read.c (GDB_FORM_cached_string): New. (read_partial_die): Use dwarf2_canonicalize_name. (dwarf2_linkage_name): Use dwarf2_name. (dwarf2_canonicalize_name): New. (dwarf2_name): Use dwarf2_canonicalize_name. (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string. * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string. * symtab.c (lookup_symbol_in_language): Canonicalize input before searching. * cp-name-parser.y: operator() requires two parameters, according to libiberty. * minsyms.c (lookup_minimal_symbol): Canonicalize input before searching. * NEWS: Update. gdb/testsuite 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/931 * gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical output. * gdb.cp/templates.exp: Allow canonical output. Remove KFAILs for gdb/931. * dw2-strp.S (DW_AT_language): Change to C++. (DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New.
This commit is contained in:
12
gdb/symtab.c
12
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user