OLD | NEW |
1 /* Routines for name->symbol lookups in GDB. | 1 /* Routines for name->symbol lookups in GDB. |
2 | 2 |
3 Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 Contributed by David Carlton <carlton@bactrian.org> and by Kealia, | 5 Contributed by David Carlton <carlton@bactrian.org> and by Kealia, |
6 Inc. | 6 Inc. |
7 | 7 |
8 This file is part of GDB. | 8 This file is part of GDB. |
9 | 9 |
10 This program is free software; you can redistribute it and/or modify | 10 This program is free software; you can redistribute it and/or modify |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 /* Free the memory used by a dictionary that's not on an obstack. (If | 79 /* Free the memory used by a dictionary that's not on an obstack. (If |
80 any.) */ | 80 any.) */ |
81 | 81 |
82 extern void dict_free (struct dictionary *dict); | 82 extern void dict_free (struct dictionary *dict); |
83 | 83 |
84 /* Add a symbol to an expandable dictionary. */ | 84 /* Add a symbol to an expandable dictionary. */ |
85 | 85 |
86 extern void dict_add_symbol (struct dictionary *dict, struct symbol *sym); | 86 extern void dict_add_symbol (struct dictionary *dict, struct symbol *sym); |
87 | 87 |
| 88 /* Utility to add a list of symbols to a dictionary. */ |
| 89 |
| 90 extern void dict_add_pending (struct dictionary *dict, |
| 91 const struct pending *symbol_list); |
| 92 |
88 /* Is the dictionary empty? */ | 93 /* Is the dictionary empty? */ |
89 | 94 |
90 extern int dict_empty (struct dictionary *dict); | 95 extern int dict_empty (struct dictionary *dict); |
91 | 96 |
92 /* A type containing data that is used when iterating over all symbols | 97 /* A type containing data that is used when iterating over all symbols |
93 in a dictionary. Don't ever look at its innards; this type would | 98 in a dictionary. Don't ever look at its innards; this type would |
94 be opaque if we didn't need to be able to allocate it on the | 99 be opaque if we didn't need to be able to allocate it on the |
95 stack. */ | 100 stack. */ |
96 | 101 |
97 struct dict_iterator | 102 struct dict_iterator |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 175 |
171 It's implemented as a single loop, so you can terminate the loop | 176 It's implemented as a single loop, so you can terminate the loop |
172 early by a break if you desire. */ | 177 early by a break if you desire. */ |
173 | 178 |
174 #define ALL_DICT_SYMBOLS(dict, iter, sym) \ | 179 #define ALL_DICT_SYMBOLS(dict, iter, sym) \ |
175 for ((sym) = dict_iterator_first ((dict), &(iter)); \ | 180 for ((sym) = dict_iterator_first ((dict), &(iter)); \ |
176 (sym); \ | 181 (sym); \ |
177 (sym) = dict_iterator_next (&(iter))) | 182 (sym) = dict_iterator_next (&(iter))) |
178 | 183 |
179 #endif /* DICTIONARY_H */ | 184 #endif /* DICTIONARY_H */ |
OLD | NEW |