Remove language param from name_matcher in struct quick_symbol_functions
authorJoel Brobecker <brobecker@gnat.com>
Thu, 26 Jan 2012 04:21:40 +0000 (04:21 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 26 Jan 2012 04:21:40 +0000 (04:21 +0000)
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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/dwarf2read.c
gdb/linespec.c
gdb/psymtab.c
gdb/psymtab.h
gdb/symfile.h
gdb/symtab.c

index ab288c9b0f91d77b56bd5a8e3e0d659270167592..bf53d7bff439bb160d40cf4664b9107d13e96bae 100644 (file)
@@ -1,3 +1,17 @@
+2012-01-26  Joel Brobecker  <brobecker@adacore.com>
+
+       * 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  <brobecker@adacore.com>
 
        * language.h (symbol_name_match_p_ftype): New typedef.
index 2f70980b4caef7134c6ba658d765dd9cb078a715..55e318f819417dd135b134f76f82eadecd2162ba 100644 (file)
@@ -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;
   
index 0ef0a5b38d58eb1245edc46f47d57b8f447bc5f5..76f8510e57be59bd515a806160ff31d4cfbb209e 100644 (file)
@@ -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
index 28fcf4dd4dd21b150db1b95a31db53120f541d3f..dc9dfc60b57bdb29eaf8bb6a0decc7448a749440 100644 (file)
@@ -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;
 
index 998bc05b7309a842d288f0d5ec86d674ab903a07..4d3dced1dacae067e25d526ae8438aa4b0aa97a0 100644 (file)
@@ -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)
 \f
 
 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;
index 8fd91ee283e1e9b3618a0a43dd9a44c9cca618c2..4089d462b8cb416d648ab9d599bcd7e032ed060a 100644 (file)
@@ -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,
index 7af6094561a11fc6c14ebf8f304bf65e37878a64..d4f3fd90385dd19fb66fe516ec0e688b4a3a829b 100644 (file)
@@ -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);
 
index 1746d69a3e8bb0d0b25f2991e59a98234535dcfd..d3e7b04c23cecf6347799765be004a9e3e236478 100644 (file)
@@ -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;