/* Get info from stack frames; convert between frames, blocks,
functions and pc values.
- Copyright (C) 1986-2018 Free Software Foundation, Inc.
+ Copyright (C) 1986-2019 Free Software Foundation, Inc.
This file is part of GDB.
struct symbol *f;
struct bound_minimal_symbol msymbol;
struct compunit_symtab *compunit_symtab = NULL;
- struct objfile *objfile;
CORE_ADDR mapped_pc;
/* To ensure that the symbol returned belongs to the correct setion
goto return_cached_value;
msymbol = lookup_minimal_symbol_by_pc_section (mapped_pc, section);
- ALL_OBJFILES (objfile)
- {
- if (objfile->sf)
- {
- compunit_symtab
- = objfile->sf->qf->find_pc_sect_compunit_symtab (objfile, msymbol,
- mapped_pc, section,
- 0);
- }
- if (compunit_symtab != NULL)
- break;
- }
+ for (objfile *objfile : current_program_space->objfiles ())
+ {
+ if (objfile->sf)
+ {
+ compunit_symtab
+ = objfile->sf->qf->find_pc_sect_compunit_symtab (objfile, msymbol,
+ mapped_pc,
+ section,
+ 0);
+ }
+ if (compunit_symtab != NULL)
+ break;
+ }
if (compunit_symtab != NULL)
{
*address = 0;
if (endaddr != NULL)
*endaddr = 0;
+ if (block != nullptr)
+ *block = nullptr;
return 0;
}