summaryrefslogtreecommitdiff
path: root/gdb/dictionary.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-07-10 20:12:30 +0000
committerDoug Evans <dje@google.com>2012-07-10 20:12:30 +0000
commite1dd9547b6e990d6c3a35106b5a21dc3649b1be2 (patch)
tree9ee47eb7e86c5a54a5270456dd2c6181c1336b7d /gdb/dictionary.c
parenta78ba7da2c1b39cfa083ef3bc83aadcff4f32909 (diff)
downloadgdb-e1dd9547b6e990d6c3a35106b5a21dc3649b1be2.tar.gz
* 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 0a3a1039d12..62362c5c82e 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. */