-struct objfile *
-lookup_objfile_from_block (const struct block *block)
-{
- if (block == NULL)
- return NULL;
-
- block = block_global_block (block);
- /* Look through all blockvectors. */
- for (objfile *obj : current_program_space->objfiles ())
- {
- for (compunit_symtab *cust : obj->compunits ())
- if (block == BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust),
- GLOBAL_BLOCK))
- {
- if (obj->separate_debug_objfile_backlink)
- obj = obj->separate_debug_objfile_backlink;
-
- return obj;
- }
- }
-
- return NULL;
-}
-
-/* See symtab.h. */
-