if (bp_objfile_data->overlay_msym.minsym == NULL)
{
bound_minimal_symbol m
- = lookup_minimal_symbol_text (func_name, objfile);
+ = lookup_minimal_symbol_text (current_program_space, func_name,
+ objfile);
if (m.minsym == NULL)
{
/* Avoid future lookups in this objfile. */
if (bp_objfile_data->longjmp_msym[i].minsym == NULL)
{
bound_minimal_symbol m
- = lookup_minimal_symbol_text (func_name, objfile);
+ = lookup_minimal_symbol_text (objfile->pspace (), func_name,
+ objfile);
if (m.minsym == NULL)
{
/* Prevent future lookups in this objfile. */
if (bp_objfile_data->exception_msym.minsym == NULL)
{
bound_minimal_symbol debug_hook
- = lookup_minimal_symbol_text (func_name, objfile);
+ = lookup_minimal_symbol_text (objfile->pspace (), func_name, objfile);
if (debug_hook.minsym == NULL)
{
bp_objfile_data->exception_msym.minsym = &msym_not_found;
/* Lookup the registration symbol. If it is missing, then we
assume we are not attached to a JIT. */
bound_minimal_symbol reg_symbol
- = lookup_minimal_symbol_text (jit_break_name, the_objfile);
+ = lookup_minimal_symbol_text (pspace, jit_break_name, the_objfile);
if (reg_symbol.minsym == NULL
|| reg_symbol.value_address () == 0)
{
/* See minsyms.h. */
bound_minimal_symbol
-lookup_minimal_symbol_text (const char *name, struct objfile *objf)
+lookup_minimal_symbol_text (program_space *pspace, const char *name,
+ objfile *objf)
{
struct minimal_symbol *msymbol;
bound_minimal_symbol found_symbol;
if (objf == nullptr)
{
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
{
if (found_symbol.minsym != NULL)
break;
objfile *obj = nullptr,
const char *sfile = nullptr);
-/* Look through all the current minimal symbol tables and find the
+/* Look through all the minimal symbol tables in PSPACE and find the
first minimal symbol that matches NAME and has text type. If OBJF
is non-NULL, limit the search to that objfile. Returns a bound
minimal symbol that matches, or an "empty" bound minimal symbol
This function only searches the mangled (linkage) names. */
-bound_minimal_symbol lookup_minimal_symbol_text (const char *,
- struct objfile *);
+bound_minimal_symbol lookup_minimal_symbol_text (program_space *pspace,
+ const char *name,
+ objfile *objf);
/* Look through the minimal symbols in OBJF (and its separate debug
objfiles) for a global (not file-local) minsym whose linkage name
if (msymbol.minsym->type () == mst_solib_trampoline)
{
bound_minimal_symbol mfunsym
- = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (), NULL);
+ = lookup_minimal_symbol_text (section->objfile->pspace (),
+ msymbol.minsym->linkage_name (),
+ nullptr);
if (mfunsym.minsym == NULL)
/* I eliminated this warning since it is coming out