From 618daa933cdce21424d3759ea95a4e2f5c69a1c2 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 10 Jan 2018 20:38:08 +0000 Subject: [PATCH] language_get_symbol_name_matcher -> get_symbol_name_matcher Rename language_get_symbol_name_matcher -> get_symbol_name_matcher, since the function is no longer a straight "language method". gdb/ChangeLog: 2018-01-10 Pedro Alves * language.h (language_get_symbol_name_matcher): Rename ... (get_symbol_name_matcher): ... this. * language.c (language_get_symbol_name_matcher): Ditto. * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All callers adjusted. --- gdb/ChangeLog | 8 ++++++++ gdb/dictionary.c | 6 +++--- gdb/dwarf2read.c | 2 +- gdb/language.c | 4 ++-- gdb/language.h | 2 +- gdb/linespec.c | 2 +- gdb/minsyms.c | 6 +++--- gdb/psymtab.c | 2 +- gdb/symtab.c | 5 ++--- 9 files changed, 22 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d81b4856ffe..17f7c8b6a63 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2018-01-10 Pedro Alves + + * language.h (language_get_symbol_name_matcher): Rename ... + (get_symbol_name_matcher): ... this. + * language.c (language_get_symbol_name_matcher): Ditto. + * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All + callers adjusted. + 2018-01-10 Pedro Alves PR gdb/22670 diff --git a/gdb/dictionary.c b/gdb/dictionary.c index a6049f79b70..da8b7da2085 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -631,7 +631,7 @@ iter_match_first_hashed (const struct dictionary *dict, unsigned int hash_index = (name.search_name_hash (lang->la_language) % DICT_HASHED_NBUCKETS (dict)); symbol_name_matcher_ftype *matches_name - = language_get_symbol_name_matcher (lang, name); + = get_symbol_name_matcher (lang, name); struct symbol *sym; DICT_ITERATOR_DICT (iterator) = dict; @@ -659,7 +659,7 @@ iter_match_next_hashed (const lookup_name_info &name, { const language_defn *lang = DICT_LANGUAGE (DICT_ITERATOR_DICT (iterator)); symbol_name_matcher_ftype *matches_name - = language_get_symbol_name_matcher (lang, name); + = get_symbol_name_matcher (lang, name); struct symbol *next; for (next = DICT_ITERATOR_CURRENT (iterator)->hash_next; @@ -875,7 +875,7 @@ iter_match_next_linear (const lookup_name_info &name, const struct dictionary *dict = DICT_ITERATOR_DICT (iterator); const language_defn *lang = DICT_LANGUAGE (dict); symbol_name_matcher_ftype *matches_name - = language_get_symbol_name_matcher (lang, name); + = get_symbol_name_matcher (lang, name); int i, nsyms = DICT_LINEAR_NSYMS (dict); struct symbol *sym, *retval = NULL; diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 604dca5606c..dca2fe94dc3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4572,7 +4572,7 @@ gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher { const language_defn *lang = language_def ((enum language) i); symbol_name_matcher_ftype *name_matcher - = language_get_symbol_name_matcher (lang, m_lookup_name); + = get_symbol_name_matcher (lang, m_lookup_name); /* Don't insert the same comparison routine more than once. Note that we do this linear walk instead of a seemingly diff --git a/gdb/language.c b/gdb/language.c index c80237e6f9d..0d8604b8268 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -727,8 +727,8 @@ default_symbol_name_matcher (const char *symbol_search_name, /* See language.h. */ symbol_name_matcher_ftype * -language_get_symbol_name_matcher (const language_defn *lang, - const lookup_name_info &lookup_name) +get_symbol_name_matcher (const language_defn *lang, + const lookup_name_info &lookup_name) { /* If currently in Ada mode, and the lookup name is wrapped in '<...>', hijack all symbol name comparisons using the Ada diff --git a/gdb/language.h b/gdb/language.h index 50610959715..06b42aeb5c4 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -637,7 +637,7 @@ extern bool default_symbol_name_matcher the function may ignore it depending on the current language and LOOKUP_NAME. Specifically, if the current language is Ada, this may return an Ada matcher regardless of LANG. */ -symbol_name_matcher_ftype *language_get_symbol_name_matcher +symbol_name_matcher_ftype *get_symbol_name_matcher (const language_defn *lang, const lookup_name_info &lookup_name); /* The languages supported by GDB. */ diff --git a/gdb/linespec.c b/gdb/linespec.c index 73fce0cbf18..85f412766c8 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1226,7 +1226,7 @@ find_methods (struct type *t, enum language t_lang, const char *name, int method_counter; lookup_name_info lookup_name (name, symbol_name_match_type::FULL); symbol_name_matcher_ftype *symbol_name_compare - = language_get_symbol_name_matcher (language_def (t_lang), lookup_name); + = get_symbol_name_matcher (language_def (t_lang), lookup_name); t = check_typedef (t); diff --git a/gdb/minsyms.c b/gdb/minsyms.c index fded0d65e93..a55c0718fcb 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -359,8 +359,8 @@ lookup_minimal_symbol (const char *name, const char *sfile, % MINIMAL_SYMBOL_HASH_SIZE); symbol_name_matcher_ftype *match - = language_get_symbol_name_matcher (language_def (lang), - lookup_name); + = get_symbol_name_matcher (language_def (lang), + lookup_name); struct minimal_symbol **msymbol_demangled_hash = objfile->per_bfd->msymbol_demangled_hash; @@ -501,7 +501,7 @@ iterate_over_minimal_symbols (struct objfile *objf, { const language_defn *lang_def = language_def (lang); symbol_name_matcher_ftype *name_match - = language_get_symbol_name_matcher (lang_def, lookup_name); + = get_symbol_name_matcher (lang_def, lookup_name); unsigned int hash = lookup_name.search_name_hash (lang) % MINIMAL_SYMBOL_HASH_SIZE; diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 88d234a7da2..dc13fd560d8 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -556,7 +556,7 @@ psymbol_name_matches (partial_symbol *psym, { const language_defn *lang = language_def (SYMBOL_LANGUAGE (psym)); symbol_name_matcher_ftype *name_match - = language_get_symbol_name_matcher (lang, lookup_name); + = get_symbol_name_matcher (lang, lookup_name); return name_match (SYMBOL_SEARCH_NAME (psym), lookup_name, NULL); } diff --git a/gdb/symtab.c b/gdb/symtab.c index 2fe249682f2..81f4fc9ec58 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -955,8 +955,7 @@ symbol_matches_search_name (const struct general_symbol_info *gsymbol, const lookup_name_info &name) { symbol_name_matcher_ftype *name_match - = language_get_symbol_name_matcher (language_def (gsymbol->language), - name); + = get_symbol_name_matcher (language_def (gsymbol->language), name); return name_match (symbol_search_name (gsymbol), name, NULL); } @@ -4707,7 +4706,7 @@ compare_symbol_name (const char *symbol_name, language symbol_language, const language_defn *lang = language_def (symbol_language); symbol_name_matcher_ftype *name_match - = language_get_symbol_name_matcher (lang, lookup_name); + = get_symbol_name_matcher (lang, lookup_name); return name_match (symbol_name, lookup_name, &match_res); } -- 2.30.2