From: Joel Brobecker Date: Thu, 26 Jan 2012 04:21:40 +0000 (+0000) Subject: Remove language param from name_matcher in struct quick_symbol_functions X-Git-Tag: sid-snapshot-20120201~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e078317b28df990d6b0d54020f364df44d1b9ce4;p=external%2Fbinutils.git Remove language param from name_matcher in struct quick_symbol_functions The quick_symbol_functions struct contains a field which is pointer a function which takes another function, called name_matcher, as its parameter. This name_matcher currently has 3 arguments, one of them being the language. This parameter is no longer used, and thus deleted. gdb/ChangeLog: * symfile.h (struct quick_symbol_functions) [expand_symtabs_matching]: Remove language parameter from name_matcher. Adjust the comment. * symtab.c (search_symbols_name_matches, expand_partial_symbol_name): Remove language parameter. * ada-lang.c (ada_expand_partial_symbol_name): Likewise. * linespec.c (iterate_name_matcher): Likewise. * dwarf2read.c (dw2_expand_symtabs_matching): Adjust type of name_matcher. Adjust call accordingly. * psymtab.c (expand_symtabs_matching_via_partial): Likewise. (maintenance_check_symtabs): Adjust type of parameter "fun". * psymtab.h (maintenance_check_symtabs): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab288c9..bf53d7b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2012-01-26 Joel Brobecker + * symfile.h (struct quick_symbol_functions) [expand_symtabs_matching]: + Remove language parameter from name_matcher. Adjust the comment. + * symtab.c (search_symbols_name_matches, expand_partial_symbol_name): + Remove language parameter. + * ada-lang.c (ada_expand_partial_symbol_name): Likewise. + * linespec.c (iterate_name_matcher): Likewise. + * dwarf2read.c (dw2_expand_symtabs_matching): Adjust type of + name_matcher. Adjust call accordingly. + * psymtab.c (expand_symtabs_matching_via_partial): Likewise. + (maintenance_check_symtabs): Adjust type of parameter "fun". + * psymtab.h (maintenance_check_symtabs): Likewise. + +2012-01-26 Joel Brobecker + * language.h (symbol_name_match_p_ftype): New typedef. (struct language_defn): Replace field la_symbol_name_compare by la_get_symbol_name_match_p. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 2f70980..55e318f 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5699,8 +5699,7 @@ struct add_partial_datum /* A callback for expand_partial_symbol_names. */ static int -ada_expand_partial_symbol_name (const struct language_defn *language, - const char *name, void *user_data) +ada_expand_partial_symbol_name (const char *name, void *user_data) { struct add_partial_datum *data = user_data; diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0ef0a5b..76f8510 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2691,7 +2691,7 @@ static void dw2_expand_symtabs_matching (struct objfile *objfile, int (*file_matcher) (const char *, void *), - int (*name_matcher) (const struct language_defn *, const char *, void *), + int (*name_matcher) (const char *, void *), enum search_domain kind, void *data) { @@ -2745,7 +2745,7 @@ dw2_expand_symtabs_matching name = index->constant_pool + MAYBE_SWAP (index->symbol_table[idx]); - if (! (*name_matcher) (current_language, name, data)) + if (! (*name_matcher) (name, data)) continue; /* The name was matched, now expand corresponding CUs that were diff --git a/gdb/linespec.c b/gdb/linespec.c index 28fcf4d..dc9dfc6 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -336,8 +336,7 @@ struct symbol_matcher_data callback to the expand_symtabs_matching method. */ static int -iterate_name_matcher (const struct language_defn *language, - const char *name, void *d) +iterate_name_matcher (const char *name, void *d) { const struct symbol_matcher_data *data = d; diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 998bc05..4d3dced 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1250,7 +1250,7 @@ static void expand_symtabs_matching_via_partial (struct objfile *objfile, int (*file_matcher) (const char *, void *), - int (*name_matcher) (const struct language_defn *, const char *, void *), + int (*name_matcher) (const char *, void *), enum search_domain kind, void *data) { @@ -1302,8 +1302,7 @@ expand_symtabs_matching_via_partial && SYMBOL_CLASS (*psym) == LOC_BLOCK) || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF)) - && (*name_matcher) (current_language, - SYMBOL_SEARCH_NAME (*psym), data)) + && (*name_matcher) (SYMBOL_SEARCH_NAME (*psym), data)) { PSYMTAB_TO_SYMTAB (ps); keep_going = 0; @@ -1943,8 +1942,7 @@ maintenance_check_symtabs (char *ignore, int from_tty) void -expand_partial_symbol_names (int (*fun) (const struct language_defn *, - const char *, void *), +expand_partial_symbol_names (int (*fun) (const char *, void *), void *data) { struct objfile *objfile; diff --git a/gdb/psymtab.h b/gdb/psymtab.h index 8fd91ee..4089d46 100644 --- a/gdb/psymtab.h +++ b/gdb/psymtab.h @@ -30,8 +30,7 @@ extern struct psymbol_bcache *psymbol_bcache_init (void); extern void psymbol_bcache_free (struct psymbol_bcache *); extern struct bcache *psymbol_bcache_get_bcache (struct psymbol_bcache *); -void expand_partial_symbol_names (int (*fun) (const struct language_defn *, - const char *, void *), +void expand_partial_symbol_names (int (*fun) (const char *, void *), void *data); void map_partial_symbol_filenames (symbol_filename_ftype *fun, void *data, diff --git a/gdb/symfile.h b/gdb/symfile.h index 7af6094..d4f3fd9 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -260,8 +260,8 @@ struct quick_symbol_functions Otherwise, if KIND does not match this symbol is skipped. If even KIND matches, then NAME_MATCHER is called for each symbol - defined in the file. The current language, the symbol "search" - name and DATA are passed to NAME_MATCHER. + defined in the file. The symbol "search" name and DATA are passed + to NAME_MATCHER. If NAME_MATCHER returns zero, then this symbol is skipped. @@ -272,7 +272,7 @@ struct quick_symbol_functions void (*expand_symtabs_matching) (struct objfile *objfile, int (*file_matcher) (const char *, void *), - int (*name_matcher) (const struct language_defn *, const char *, void *), + int (*name_matcher) (const char *, void *), enum search_domain kind, void *data); diff --git a/gdb/symtab.c b/gdb/symtab.c index 1746d69..d3e7b04 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -3201,8 +3201,7 @@ search_symbols_file_matches (const char *filename, void *user_data) /* A callback for expand_symtabs_matching. */ static int -search_symbols_name_matches (const struct language_defn *language, - const char *symname, void *user_data) +search_symbols_name_matches (const char *symname, void *user_data) { struct search_symbols_data *data = user_data; @@ -4010,8 +4009,7 @@ add_macro_name (const char *name, const struct macro_definition *ignore, /* A callback for expand_partial_symbol_names. */ static int -expand_partial_symbol_name (const struct language_defn *language, - const char *name, void *user_data) +expand_partial_symbol_name (const char *name, void *user_data) { struct add_name_data *datum = (struct add_name_data *) user_data;