aboutsummaryrefslogtreecommitdiff
path: root/gdb/dictionary.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-07-10 20:12:49 +0000
committerDoug Evans <dje@google.com>2012-07-10 20:12:49 +0000
commit0bfa869d53ae28e6707936910a55317dfe816e14 (patch)
tree38966dfc4831208f2e5603106ac74b1e92fb0816 /gdb/dictionary.c
parent298a9cf0efcb7be466df40d6c31c0b4135cf0ac7 (diff)
downloadgdb-0bfa869d53ae28e6707936910a55317dfe816e14.zip
gdb-0bfa869d53ae28e6707936910a55317dfe816e14.tar.gz
gdb-0bfa869d53ae28e6707936910a55317dfe816e14.tar.bz2
* dictionary.c (dict_add_pending): New function.
* dictionary.h (dict_add_pending): Declare.
Diffstat (limited to 'gdb/dictionary.c')
-rw-r--r--gdb/dictionary.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index 0a3a103..62362c5 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -498,6 +498,22 @@ dict_add_symbol (struct dictionary *dict, struct symbol *sym)
(DICT_VECTOR (dict))->add_symbol (dict, sym);
}
+/* Utility to add a list of symbols to a dictionary.
+ DICT must be an expandable dictionary. */
+
+void
+dict_add_pending (struct dictionary *dict, const struct pending *symbol_list)
+{
+ const struct pending *list;
+ int i;
+
+ for (list = symbol_list; list != NULL; list = list->next)
+ {
+ for (i = 0; i < list->nsyms; ++i)
+ dict_add_symbol (dict, list->symbol[i]);
+ }
+}
+
/* Initialize ITERATOR to point at the first symbol in DICT, and
return that first symbol, or NULL if DICT is empty. */