From bb2f58dc41241652af78a29619c0a7986669bcd3 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 21 Dec 2011 07:34:09 +0000 Subject: Use symbol search name in expand_symtabs_matching_via_partial... We are iterating over all symbols in a partial symtab that would match a given name, so we should match the partial symbols search name against the given name rather than using the natural name. In C++, that does not make a difference, but it does in Ada, because Ada searches using the symbol encoded name... We also update the generation of the .gdb_index file to match this change in the search. Although technically an incompatible change, we do not increment the gdb_index version number, because Ada is the only language where it would make a difference - except that this feature is not supported for Ada. gdb/ChangeLog: * psymtab.c (expand_symtabs_matching_via_partial): Match the partial symbols using their SYMBOL_SEARCH_NAME. * symfile.h (struct quick_symbol_functions): Udate the documentation of expand_symtabs_matching. * dwarf2read.c (write_psymbols): Use SYMBOL_SEARCH_NAME instead of SYMBOL_NATURAL_NAME in index entry. --- gdb/dwarf2read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/dwarf2read.c') diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index c482c43..7905052 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -16890,7 +16890,7 @@ write_psymbols (struct mapped_symtab *symtab, if (!*slot) { *slot = lookup; - add_index_entry (symtab, SYMBOL_NATURAL_NAME (*psymp), cu_index); + add_index_entry (symtab, SYMBOL_SEARCH_NAME (*psymp), cu_index); } } } -- cgit v1.1