aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-02-08 19:54:37 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-02-08 19:54:37 +0000
commit1a119f3613c3094c82b127b735b9c69648a37387 (patch)
tree3deed814f0c862ba4f677195a5a6f6e74dc27477 /gdb/linespec.c
parent97298d2971cc5c8cbe90566171777c660b74642b (diff)
downloadgdb-1a119f3613c3094c82b127b735b9c69648a37387.zip
gdb-1a119f3613c3094c82b127b735b9c69648a37387.tar.gz
gdb-1a119f3613c3094c82b127b735b9c69648a37387.tar.bz2
Rename la_get_symbol_name_match_p into la_get_symbol_name_cmp
The la_get_symbol_name_match_p language hook was poorly named, as it suggested that the function should return nonzero if the names match, whereas it is the exact opposite. This patch therefore renames the hook and associated typedef, as well some of the code that uses that hook. gdb/ChangeLog: * language.h (symbol_name_cmp_ftype): Renames symbol_name_match_p_ftype. (struct language_defn)[la_get_symbol_name_cmp]: Renames la_get_symbol_name_match_p. * ada-lang.c (ada_get_symbol_name_cmp): Renames ada_get_symbol_name_match_p. Update comment. (ada_language_defn)[la_get_symbol_name_cmp]: Update value. * linespec.c (struct symbol_matcher_data)[symbol_name_cmp]: Renames symbol_name_match_p. Update field type. (iterate_name_matcher, iterate_over_all_matching_symtabs): Adjust. * c-lang.c, d-lang.c, f-lang.c, jv-lang.c, m2-lang.c, objc-lang.c, opencl-lang.c, p-lang.c: Replace "la_get_symbol_name_match_p" by "la_get_symbol_name_cmp" in comments. * language.c: Likewise.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index da88d17..09d62e5 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -329,7 +329,7 @@ struct symbol_matcher_data
const char *lookup_name;
/* The routine to be used for comparison. */
- symbol_name_match_p_ftype symbol_name_match_p;
+ symbol_name_cmp_ftype symbol_name_cmp;
};
/* A helper for iterate_over_all_matching_symtabs that is passed as a
@@ -340,7 +340,7 @@ iterate_name_matcher (const char *name, void *d)
{
const struct symbol_matcher_data *data = d;
- if (data->symbol_name_match_p (name, data->lookup_name) == 0)
+ if (data->symbol_name_cmp (name, data->lookup_name) == 0)
return 1; /* Expand this symbol's symbol table. */
return 0; /* Skip this symbol. */
}
@@ -362,9 +362,9 @@ iterate_over_all_matching_symtabs (const char *name,
struct symbol_matcher_data matcher_data;
matcher_data.lookup_name = name;
- matcher_data.symbol_name_match_p =
- current_language->la_get_symbol_name_match_p != NULL
- ? current_language->la_get_symbol_name_match_p (name)
+ matcher_data.symbol_name_cmp =
+ current_language->la_get_symbol_name_cmp != NULL
+ ? current_language->la_get_symbol_name_cmp (name)
: strcmp_iw;
ALL_PSPACES (pspace)