-/* For all symbols, s, in BLOCK that are in DOMAIN and match NAME
- according to the function MATCH, call CALLBACK(BLOCK, s, DATA).
- BLOCK is assumed to come from OBJFILE. Returns 1 iff CALLBACK
- ever returns non-zero, and otherwise returns 0. */
-
-static int
-map_block (const char *name, domain_enum domain, struct objfile *objfile,
- const struct block *block,
- int (*callback) (const struct block *, struct symbol *, void *),
- void *data, symbol_name_match_type match)
-{
- struct block_iterator iter;
- struct symbol *sym;
-
- lookup_name_info lookup_name (name, match);
-
- for (sym = block_iter_match_first (block, lookup_name, &iter);
- sym != NULL;
- sym = block_iter_match_next (lookup_name, &iter))
- {
- if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
- SYMBOL_DOMAIN (sym), domain))
- {
- if (callback (block, sym, data))
- return 1;
- }
- }
-
- return 0;
-}
-