aboutsummaryrefslogtreecommitdiff
path: root/gdb/dictionary.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dictionary.h')
-rw-r--r--gdb/dictionary.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/dictionary.h b/gdb/dictionary.h
index 2242a79..f7d3035 100644
--- a/gdb/dictionary.h
+++ b/gdb/dictionary.h
@@ -134,6 +134,31 @@ extern struct symbol *dict_iter_name_first (const struct dictionary *dict,
extern struct symbol *dict_iter_name_next (const char *name,
struct dict_iterator *iterator);
+/* Initialize ITERATOR to point at the first symbol in DICT whose
+ SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (which must use
+ the same conventions as strcmp_iw and be compatible with any
+ dictionary hashing function), and return that first symbol, or NULL
+ if there are no such symbols. */
+
+extern struct symbol *dict_iter_match_first (const struct dictionary *dict,
+ const char *name,
+ int (*compare) (const char*,
+ const char *),
+ struct dict_iterator *iterator);
+
+/* Advance ITERATOR to point at the next symbol in DICT whose
+ SYMBOL_SEARCH_NAME is NAME, as tested using COMPARE (see
+ dict_iter_match_first), or NULL if there are no more such symbols.
+ Don't call this if you've previously received NULL from
+ dict_iterator_match_first or dict_iterator_match_next on this
+ iteration. And don't call it unless ITERATOR was created by a
+ previous call to dict_iter_match_first with the same NAME and COMPARE. */
+
+extern struct symbol *dict_iter_match_next (const char *name,
+ int (*compare) (const char*,
+ const char *),
+ struct dict_iterator *iterator);
+
/* Return some notion of the size of the dictionary: the number of
symbols if we have that, the number of hash buckets otherwise. */