that string, then most probably the main procedure is not written
in Ada. */
bound_minimal_symbol msym
- = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME);
+ = lookup_minimal_symbol (current_program_space,
+ ADA_MAIN_PROGRAM_SYMBOL_NAME);
if (msym.minsym != NULL)
{
the catchpoint message, and is also used when trying to catch
a specific exception). We do not handle this case for now. */
bound_minimal_symbol msym
- = lookup_minimal_symbol (einfo->catch_exception_sym);
+ = lookup_minimal_symbol (current_program_space,
+ einfo->catch_exception_sym);
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
error (_("Your Ada runtime appears to be missing some debugging "
if (sym == NULL)
{
bound_minimal_symbol msym
- = lookup_minimal_symbol (einfo->catch_handlers_sym);
+ = lookup_minimal_symbol (current_program_space,
+ einfo->catch_handlers_sym);
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
error (_("Your Ada runtime appears to be missing some debugging "
/* Check for the CPU offset. */
bound_minimal_symbol first_id_sym
- = lookup_minimal_symbol ("__gnat_gdb_cpu_first_id");
+ = lookup_minimal_symbol (current_program_space, "__gnat_gdb_cpu_first_id");
unsigned int first_id = 0;
if (first_id_sym.minsym != nullptr)
{
/* Try array. */
- bound_minimal_symbol msym = lookup_minimal_symbol (KNOWN_TASKS_NAME);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_NAME);
if (msym.minsym != NULL)
{
data->known_tasks_kind = ADA_TASKS_ARRAY;
/* Try list. */
- msym = lookup_minimal_symbol (KNOWN_TASKS_LIST);
+ msym = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_LIST);
if (msym.minsym != NULL)
{
data->known_tasks_kind = ADA_TASKS_LIST;
symbols[i].addr = 0;
else
{
- bound_minimal_symbol ms = lookup_minimal_symbol (name);
+ bound_minimal_symbol ms
+ = lookup_minimal_symbol (current_program_space, name);
if (ms.minsym == NULL)
{
if (debug_aix_thread)
return;
/* Set a breakpoint on the returned stub function. */
- bound_minimal_symbol ms = lookup_minimal_symbol (stub_name);
+ bound_minimal_symbol ms
+ = lookup_minimal_symbol (current_program_space, stub_name);
if (ms.minsym == NULL)
return;
data->pd_brk_addr = ms.value_address ();
So we look for the symbol `_dl_linux_resolver', and if we are there,
gdb sets a breakpoint at the return address, and continues. */
- bound_minimal_symbol resolver = lookup_minimal_symbol ("_dl_linux_resolver");
+ bound_minimal_symbol resolver
+ = lookup_minimal_symbol (current_program_space, "_dl_linux_resolver");
if (arc_debug)
{
char *target_name = (char *) alloca (target_len);
xsnprintf (target_name, target_len, "%s%s", "__acle_se_", name);
- bound_minimal_symbol minsym = lookup_minimal_symbol (target_name, objfile);
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (current_program_space, target_name, objfile);
if (minsym.minsym != nullptr)
return minsym.value_address ();
sec = find_pc_section (pc);
objfile = (sec == NULL) ? NULL : sec->objfile;
bound_minimal_symbol minsym
- = lookup_minimal_symbol (target_name, objfile);
+ = lookup_minimal_symbol (current_program_space, target_name, objfile);
if (minsym.minsym != NULL)
return minsym.value_address ();
else
LONGEST retval;
size_t block;
- bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "_dl_auxv");
if (msym.minsym == NULL)
return TARGET_XFER_E_IO;
pc_offset += 2;
bound_minimal_symbol msymbol
- = lookup_minimal_symbol ("__prologue_saves__");
+ = lookup_minimal_symbol (current_program_space, "__prologue_saves__");
if (!msymbol.minsym)
break;
case LOC_UNRESOLVED:
{
bound_minimal_symbol msym
- = lookup_minimal_symbol (var->linkage_name ());
+ = lookup_minimal_symbol (current_program_space,
+ var->linkage_name ());
if (!msym.minsym)
error (_("Couldn't resolve symbol `%s'."), var->print_name ());
if (bp_objfile_data->terminate_msym.minsym == NULL)
{
bound_minimal_symbol m
- = lookup_minimal_symbol (func_name, objfile);
+ = lookup_minimal_symbol (current_program_space, func_name,
+ objfile);
if (m.minsym == NULL || (m.minsym->type () != mst_text
&& m.minsym->type () != mst_file_text))
{
static CORE_ADDR
bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
{
- bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol (current_program_space, name, objfile);
if (sym.minsym)
return sym.value_address ();
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (arg.c_str ());
+ = lookup_minimal_symbol (current_program_space, arg.c_str ());
if (msymbol.minsym == NULL)
{
if (!have_full_symbols (current_program_space)
if (bsym.symbol == NULL
&& par_state->language ()->la_language == language_cplus
&& is_a_field_of_this.type == NULL
- && lookup_minimal_symbol (copy.c_str ()).minsym == nullptr)
+ && lookup_minimal_symbol (current_program_space, copy.c_str ()).minsym == nullptr)
return UNKNOWN_CPP_NAME;
return NAME;
forward_func_name);
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (forward_qualified_name.c_str ());
+ = lookup_minimal_symbol (current_program_space,
+ forward_qualified_name.c_str ());
if (!msymbol.minsym)
{
int i;
for (i = 0; i < forward_dll_name_len; i++)
forward_qualified_name[i] = tolower (forward_qualified_name[i]);
- msymbol = lookup_minimal_symbol (forward_qualified_name.c_str ());
+ msymbol = lookup_minimal_symbol (current_program_space,
+ forward_qualified_name.c_str ());
}
if (!msymbol.minsym)
name1 += 1;
bound_minimal_symbol found
- = lookup_minimal_symbol (name1, objfile);
+ = lookup_minimal_symbol (current_program_space, name1,
+ objfile);
/* If found, there are symbols named "_imp_foo" and "foo"
respectively in OBJFILE. Set the type of symbol "foo"
}
else if (request == GCC_C_ORACLE_SYMBOL)
{
- bound_minimal_symbol bmsym = lookup_minimal_symbol (identifier);
+ bound_minimal_symbol bmsym
+ = lookup_minimal_symbol (current_program_space, identifier);
if (bmsym.minsym != NULL)
{
convert_symbol_bmsym (context, bmsym);
}
else
{
- bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, identifier);
if (msym.minsym != NULL)
{
if (compile_debug)
}
else
{
- bound_minimal_symbol msym = lookup_minimal_symbol (identifier);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, identifier);
if (msym.minsym != nullptr)
{
if (compile_debug)
continue;
}
- bound_minimal_symbol bmsym = lookup_minimal_symbol (sym->name);
+ bound_minimal_symbol bmsym
+ = lookup_minimal_symbol (current_program_space, sym->name);
switch (bmsym.minsym == NULL
? mst_unknown : bmsym.minsym->type ())
{
static void
set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
{
- bound_minimal_symbol msym = lookup_minimal_symbol (name, of);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, name, of);
if (msym.minsym != NULL)
{
sym->set_value_address (msym.value_address ());
{
/* Lookup foreign name in global static symbols. */
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (copy.c_str ());
+ = lookup_minimal_symbol (current_program_space, copy.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation> (msymbol);
else if (!have_full_symbols (current_program_space)
const char *
d_main_name (void)
{
- bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, D_MAIN);
if (msym.minsym != NULL)
return D_MAIN;
strncpy (p, namestring, n);
p[n] = 0;
- bound_minimal_symbol msym = lookup_minimal_symbol (p, objfile, filename);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, p, objfile, filename);
if (msym.minsym == NULL)
{
/* Sun Fortran appends an underscore to the minimal symbol name,
was not found. */
p[n] = '_';
p[n + 1] = 0;
- msym = lookup_minimal_symbol (p, objfile, filename);
+ msym
+ = lookup_minimal_symbol (current_program_space, p, objfile, filename);
}
if (msym.minsym == NULL && filename != NULL)
{
/* Try again without the filename. */
p[n] = 0;
- msym = lookup_minimal_symbol (p, objfile);
+ msym = lookup_minimal_symbol (current_program_space, p, objfile);
}
if (msym.minsym == NULL && filename != NULL)
{
/* And try again for Sun Fortran, but without the filename. */
p[n] = '_';
p[n + 1] = 0;
- msym = lookup_minimal_symbol (p, objfile);
+ msym = lookup_minimal_symbol (current_program_space, p, objfile);
}
return msym;
p[n] = 0;
bound_minimal_symbol minsym
- = lookup_minimal_symbol (p, objfile, pst->filename);
+ = lookup_minimal_symbol (current_program_space, p, objfile,
+ pst->filename);
if (minsym.minsym == NULL)
{
/* Sun Fortran appends an underscore to the minimal symbol name,
was not found. */
p[n] = '_';
p[n + 1] = 0;
- minsym = lookup_minimal_symbol (p, objfile, pst->filename);
+ minsym = lookup_minimal_symbol (current_program_space, p, objfile,
+ pst->filename);
}
if (minsym.minsym)
physname = m_loc.physname;
/* Handle both the mangled and demangled PHYSNAME. */
- bound_minimal_symbol msym = lookup_minimal_symbol (physname);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, physname);
if (msym.minsym == NULL)
{
msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
gdb_byte *buf = (gdb_byte *) alloca (ptr_size);
bound_minimal_symbol msym
- = lookup_minimal_symbol (name_got_plt, objfile);
+ = lookup_minimal_symbol (current_program_space, name_got_plt,
+ objfile);
if (msym.minsym == NULL)
return 0;
if (msym.minsym->type () != mst_slot_got_plt)
if (value_as_long (target) == 0)
return value_from_longest (long_type, 0);
- if (lookup_minimal_symbol ("objc_msg_lookup").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "objc_msg_lookup").minsym
+ != nullptr)
gnu_runtime = 1;
/* Find the method dispatch (Apple runtime) or method lookup
static LONGEST
fbsd_read_integer_by_name (struct gdbarch *gdbarch, const char *name)
{
- bound_minimal_symbol ms = lookup_minimal_symbol (name);
+ bound_minimal_symbol ms
+ = lookup_minimal_symbol (current_program_space, name);
if (ms.minsym == NULL)
error (_("Unable to resolve symbol '%s'"), name);
CORE_ADDR
fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_minimal_symbol ("_rtld_bind");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
(var->arch (),
[var, &bmsym] (objfile *objfile)
{
- bmsym = lookup_minimal_symbol (var->linkage_name (), objfile);
+ bmsym = lookup_minimal_symbol (current_program_space,
+ var->linkage_name (), objfile);
/* Stop if a match is found. */
return bmsym.minsym != nullptr;
CORE_ADDR sym_addr = 0;
const char *name = main_name ();
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (name, current_program_space->symfile_object_file);
+ = lookup_minimal_symbol (current_program_space, name,
+ current_program_space->symfile_object_file);
if (msymbol.minsym != nullptr)
sym_addr = msymbol.value_address ();
func = get_frame_func (this_frame);
/* Check if the stack is empty. */
- bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
+ bound_minimal_symbol msym_stack
+ = lookup_minimal_symbol (current_program_space, "_stack");
if (msym_stack.minsym && info->base == msym_stack.value_address ())
return;
snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
regnum);
- bound_minimal_symbol msymbol = lookup_minimal_symbol (prolog_symbol);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, prolog_symbol);
if (msymbol.minsym)
prologs[regnum] = msymbol.value_address ();
else
struct value *sbrk_fn, *ret;
bfd_vma tmp;
- if (lookup_minimal_symbol ("sbrk").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "sbrk").minsym != nullptr)
{
sbrk_fn = find_function_in_inferior ("sbrk", &sbrk_objf);
if (sbrk_fn == NULL)
return (bfd_vma) 0;
}
- else if (lookup_minimal_symbol ("_sbrk").minsym != nullptr)
+ else if (lookup_minimal_symbol (current_program_space, "_sbrk").minsym
+ != nullptr)
{
sbrk_fn = find_function_in_inferior ("_sbrk", &sbrk_objf);
if (sbrk_fn == NULL)
debugging programs that use shared libraries. */
bound_minimal_symbol resolver
- = lookup_minimal_symbol ("_dl_runtime_resolve");
+ = lookup_minimal_symbol (current_program_space, "_dl_runtime_resolve");
if (resolver.minsym)
{
/* The dynamic linker began using this name in early 2005. */
bound_minimal_symbol fixup
- = lookup_minimal_symbol ("_dl_fixup", resolver.objfile);
+ = lookup_minimal_symbol (current_program_space, "_dl_fixup",
+ resolver.objfile);
/* This is the name used in older versions. */
if (! fixup.minsym)
- fixup = lookup_minimal_symbol ("fixup", resolver.objfile);
+ fixup = lookup_minimal_symbol (current_program_space, "fixup",
+ resolver.objfile);
if (fixup.minsym && fixup.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
{
std::string sym_name = std::string ("typeinfo for ") + name;
- bound_minimal_symbol minsym = lookup_minimal_symbol (sym_name.c_str ());
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (current_program_space, sym_name.c_str ());
if (minsym.minsym == NULL)
error (_("could not find typeinfo symbol for '%s'"), name);
fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
bound_minimal_symbol fn_sym
- = lookup_minimal_symbol (fn_name, section->objfile);
+ = lookup_minimal_symbol (current_program_space, fn_name, section->objfile);
if (fn_sym.minsym == NULL)
return 0;
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol =
- lookup_minimal_symbol (arg.c_str ());
+ lookup_minimal_symbol (current_program_space, arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
(msymbol);
const char *
go_main_name (void)
{
- bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, GO_MAIN_MAIN);
if (msym.minsym != NULL)
return GO_MAIN_MAIN;
CORE_ADDR
hppa_symbol_address(const char *sym)
{
- bound_minimal_symbol minsym = lookup_minimal_symbol (sym);
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (current_program_space, sym);
if (minsym.minsym)
return minsym.value_address ();
else
scoped_switch_fork_info switch_fork_info (pptid);
/* Get the waitpid_fn. */
- if (lookup_minimal_symbol ("waitpid").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "waitpid").minsym
+ != nullptr)
waitpid_fn = find_function_in_inferior ("waitpid", &waitpid_objf);
- if (!waitpid_fn && lookup_minimal_symbol ("_waitpid").minsym != nullptr)
+ if (!waitpid_fn
+ && (lookup_minimal_symbol (current_program_space, "_waitpid").minsym
+ != nullptr))
waitpid_fn = find_function_in_inferior ("_waitpid", &waitpid_objf);
if (waitpid_fn != nullptr)
{
/* Make the inferior fork, record its (and gdb's) state. */
- if (lookup_minimal_symbol ("fork").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "fork").minsym != nullptr)
fork_fn = find_function_in_inferior ("fork", &fork_objf);
if (!fork_fn)
- if (lookup_minimal_symbol ("_fork").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "_fork").minsym
+ != nullptr)
fork_fn = find_function_in_inferior ("fork", &fork_objf);
if (!fork_fn)
error (_("checkpoint: can't find fork function in inferior."));
CORE_ADDR version_addr;
int got, retval = 0;
- bound_minimal_symbol version_msym = lookup_minimal_symbol (ver_symbol);
+ bound_minimal_symbol version_msym
+ = lookup_minimal_symbol (current_program_space, ver_symbol);
if (version_msym.minsym == NULL)
return 0;
libpthread_objfile_p (objfile *obj)
{
return (libpthread_name_p (objfile_name (obj))
- && lookup_minimal_symbol ("pthread_create", obj).minsym != nullptr);
+ && lookup_minimal_symbol (current_program_space,
+ "pthread_create", obj).minsym != nullptr);
}
/* Attempt to initialize dlopen()ed libthread_db, described by INFO.
/* Everything else is passed in mem0, using as many bytes as
needed. This is not what the Renesas tools do, but it's
what GCC does at the moment. */
- bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
+ bound_minimal_symbol mem0
+ = lookup_minimal_symbol (current_program_space, "mem0");
if (! mem0.minsym)
error (_("The return value is stored in memory at 'mem0', "
/* Everything else is passed in mem0, using as many bytes as
needed. This is not what the Renesas tools do, but it's
what GCC does at the moment. */
- bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
+ bound_minimal_symbol mem0
+ = lookup_minimal_symbol (current_program_space, "mem0");
if (! mem0.minsym)
error (_("The return value is stored in memory at 'mem0', "
strcat (tramp_name, ".plt");
/* Try to find a linker symbol for the trampoline. */
- bound_minimal_symbol tramp_msym = lookup_minimal_symbol (tramp_name);
+ bound_minimal_symbol tramp_msym
+ = lookup_minimal_symbol (current_program_space, tramp_name);
/* We've either got another copy of the name now, or don't need
the name any more. */
memcpy (func_name, ptr_msym_name, len - 4);
func_name[len - 4] = '\0';
bound_minimal_symbol func_msym
- = lookup_minimal_symbol (func_name);
+ = lookup_minimal_symbol (current_program_space, func_name);
/* If we do have such a symbol, return its value as the
function's true address. */
func = get_frame_func (this_frame);
/* Check if the stack is empty. */
- bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
+ bound_minimal_symbol msym_stack
+ = lookup_minimal_symbol (current_program_space, "_stack");
if (msym_stack.minsym && info->base == msym_stack.value_address ())
return;
static void
m68hc11_get_register_info (struct m68hc11_soft_reg *reg, const char *name)
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, name);
if (msymbol.minsym)
{
reg->addr = msymbol.value_address ();
&& *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
++name;
- bound_minimal_symbol msym = lookup_minimal_symbol (name, main_objfile);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, name, main_objfile);
if (msym.minsym == NULL)
{
warning (_("can't find symbol '%s' in minsymtab"), name);
but the demangled names are all the same: S::S or S::~S. */
bound_minimal_symbol
-lookup_minimal_symbol (const char *name, objfile *objf, const char *sfile)
+lookup_minimal_symbol (program_space *pspace, const char *name, objfile *objf,
+ const char *sfile)
{
found_minimal_symbols found;
lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
{
if (found.external_symbol.minsym != NULL)
break;
if (objf == NULL || objf == objfile
|| objf == objfile->separate_debug_objfile_backlink)
{
- symbol_lookup_debug_printf ("lookup_minimal_symbol (%s, %s, %s)",
+ symbol_lookup_debug_printf ("lookup_minimal_symbol (%s, %s, %s, %s)",
+ host_address_to_string (pspace),
name, sfile != NULL ? sfile : "NULL",
objfile_debug_name (objfile));
find_minimal_symbol_address (const char *name, CORE_ADDR *addr,
struct objfile *objfile)
{
- bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol (current_program_space, name, objfile);
if (sym.minsym != NULL)
*addr = sym.value_address ();
#ifndef MINSYMS_H
#define MINSYMS_H
+struct program_space;
struct type;
/* Several lookup functions return both a minimal symbol and the
symbols are still preferred). Returns a bound minimal symbol that
matches, or an empty bound minimal symbol if no match is found. */
-bound_minimal_symbol lookup_minimal_symbol (const char *name,
+bound_minimal_symbol lookup_minimal_symbol (program_space *pspace,
+ const char *name,
objfile *obj = nullptr,
const char *sfile = nullptr);
static CORE_ADDR
mips_fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_minimal_symbol ("_mips_rtld_bind");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "_mips_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
bound_minimal_symbol resolver
- = lookup_minimal_symbol ("__dl_runtime_resolve");
+ = lookup_minimal_symbol (current_program_space, "__dl_runtime_resolve");
if (resolver.minsym && resolver.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
static CORE_ADDR
nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_minimal_symbol ("_rtld_bind_start");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "_rtld_bind_start");
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
return 0;
}
- if (lookup_minimal_symbol ("objc_lookUpClass").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space,
+ "objc_lookUpClass").minsym != nullptr)
function = find_function_in_inferior("objc_lookUpClass", NULL);
- else if (lookup_minimal_symbol ("objc_lookup_class").minsym != nullptr)
+ else if (lookup_minimal_symbol (current_program_space,
+ "objc_lookup_class").minsym != nullptr)
function = find_function_in_inferior("objc_lookup_class", NULL);
else
{
return 0;
}
- if (lookup_minimal_symbol ("sel_getUid").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "sel_getUid").minsym
+ != nullptr)
function = find_function_in_inferior("sel_getUid", NULL);
- else if (lookup_minimal_symbol ("sel_get_any_uid").minsym != nullptr)
+ else if (lookup_minimal_symbol (current_program_space,
+ "sel_get_any_uid").minsym != nullptr)
function = find_function_in_inferior("sel_get_any_uid", NULL);
else
{
stringValue[2] = value_string(ptr, len, char_type);
stringValue[2] = value_coerce_array(stringValue[2]);
/* _NSNewStringFromCString replaces "istr" after Lantern2A. */
- if (lookup_minimal_symbol ("_NSNewStringFromCString").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space,
+ "_NSNewStringFromCString").minsym != nullptr)
{
function = find_function_in_inferior("_NSNewStringFromCString", NULL);
nsstringValue = call_function_by_hand(function, NULL, stringValue[2]);
}
- else if (lookup_minimal_symbol ("istr").minsym != nullptr)
+ else if (lookup_minimal_symbol (current_program_space,
+ "istr").minsym != nullptr)
{
function = find_function_in_inferior("istr", NULL);
nsstringValue = call_function_by_hand(function, NULL, stringValue[2]);
}
- else if (lookup_minimal_symbol ("+[NSString stringWithCString:]").minsym
+ else if (lookup_minimal_symbol (current_program_space,
+ "+[NSString stringWithCString:]").minsym
!= nullptr)
{
function
symbol_names->push_back (sym->natural_name ());
else
{
- bound_minimal_symbol msym = lookup_minimal_symbol (selector);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, selector);
if (msym.minsym != NULL)
symbol_names->push_back (msym.minsym->natural_name ());
for (i = 0; i < nmethcalls; i++)
{
/* Try both with and without underscore. */
- bound_minimal_symbol func = lookup_minimal_symbol (methcalls[i].name);
+ bound_minimal_symbol func
+ = lookup_minimal_symbol (current_program_space, methcalls[i].name);
if ((func.minsym == NULL) && (methcalls[i].name[0] == '_'))
{
- func = lookup_minimal_symbol (methcalls[i].name + 1);
+ func = lookup_minimal_symbol (current_program_space,
+ methcalls[i].name + 1);
}
if (func.minsym == NULL)
{
CORE_ADDR
obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "_dl_bind");
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
std::string arg = copy_name ($1.stoken);
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (arg.c_str ());
+ = lookup_minimal_symbol (current_program_space, arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
(msymbol);
const char *
pascal_main_name (void)
{
- bound_minimal_symbol msym = lookup_minimal_symbol (GPC_P_INITIALIZE);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, GPC_P_INITIALIZE);
/* If '_p_initialize' was not found, the main program is likely not
written in Pascal. */
if (msym.minsym == NULL)
return NULL;
- msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_1);
+ msym
+ = lookup_minimal_symbol (current_program_space, GPC_MAIN_PROGRAM_NAME_1);
if (msym.minsym != NULL)
{
return GPC_MAIN_PROGRAM_NAME_1;
}
- msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_2);
+ msym
+ = lookup_minimal_symbol (current_program_space, GPC_MAIN_PROGRAM_NAME_2);
if (msym.minsym != NULL)
{
return GPC_MAIN_PROGRAM_NAME_2;
}
else
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, name);
if (msymbol.minsym != NULL)
push_new<expr::var_msym_value_operation> (msymbol);
else if (!have_full_symbols (current_program_space)
push_new<expr::var_value_operation> (sym);
return;
}
- bound_minimal_symbol msym = lookup_minimal_symbol (copy.c_str ());
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, copy.c_str ());
if (msym.minsym)
{
push_new<expr::var_msym_value_operation> (msym);
- avoids problems when two object files (i.e., shared libraries)
contain a minimal symbol with the same name. */
bound_minimal_symbol fn
- = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1,
+ = lookup_minimal_symbol (current_program_space,
+ dot_fn.minsym->linkage_name () + 1,
dot_fn_section->objfile);
if (fn.minsym == NULL)
return 0;
return;
}
- bound_minimal_symbol msymbol = lookup_minimal_symbol (exp);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, exp);
if (msymbol.minsym != NULL)
{
case LOC_UNRESOLVED:
{
bound_minimal_symbol msym
- = lookup_minimal_symbol (sym->linkage_name ());
+ = lookup_minimal_symbol (current_program_space,
+ sym->linkage_name ());
if (msym.minsym == NULL)
gdb_printf ("unresolved");
else
set_current_program_space (inf->pspace);
/* FIXME: kettenis/2000-09-03: What should we do with OBJ? */
- bound_minimal_symbol ms = lookup_minimal_symbol (name);
+ bound_minimal_symbol ms
+ = lookup_minimal_symbol (current_program_space, name);
if (ms.minsym == NULL)
return PS_NOSYM;
static bound_minimal_symbol
get_running_thread_msymbol ()
{
- bound_minimal_symbol msym = lookup_minimal_symbol (running_thread_name);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, running_thread_name);
if (!msym.minsym)
/* Older versions of the GNAT runtime were using a different
(less ideal) name for the symbol where the active thread ID
is stored. If we couldn't find the symbol using the latest
name, then try the old one. */
- msym = lookup_minimal_symbol ("running_thread");
+ msym = lookup_minimal_symbol (current_program_space, "running_thread");
return msym;
}
has_ravenscar_runtime ()
{
bound_minimal_symbol msym_ravenscar_runtime_initializer
- = lookup_minimal_symbol (ravenscar_runtime_initializer);
+ = lookup_minimal_symbol (current_program_space,
+ ravenscar_runtime_initializer);
bound_minimal_symbol msym_known_tasks
- = lookup_minimal_symbol (known_tasks_name);
+ = lookup_minimal_symbol (current_program_space, known_tasks_name);
bound_minimal_symbol msym_first_task
- = lookup_minimal_symbol (first_task_name);
+ = lookup_minimal_symbol (current_program_space, first_task_name);
bound_minimal_symbol msym_running_thread = get_running_thread_msymbol ();
return (msym_ravenscar_runtime_initializer.minsym
return NOTHING_SPECIAL;
bound_minimal_symbol fpu_context
- = lookup_minimal_symbol ("system__bb__cpu_primitives__current_fpu_context",
+ = lookup_minimal_symbol (current_program_space,
+ "system__bb__cpu_primitives__current_fpu_context",
nullptr, nullptr);
/* If the symbol can't be found, just fall back. */
if (fpu_context.minsym == nullptr)
end = hex2bin (tmp, reinterpret_cast <gdb_byte *> (msg.data ()),
strlen (tmp) / 2);
msg[end] = '\0';
- bound_minimal_symbol sym = lookup_minimal_symbol (msg.data ());
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol (current_program_space, msg.data ());
if (sym.minsym == NULL)
xsnprintf (msg.data (), get_remote_packet_size (), "qSymbol::%s",
&reply[8]);
ps_pglobal_lookup (struct ps_prochandle *ph, const char *ld_object_name,
const char *ld_symbol_name, psaddr_t *ld_symbol_addr)
{
- bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name);
+ bound_minimal_symbol ms
+ = lookup_minimal_symbol (current_program_space, ld_symbol_name);
if (!ms.minsym)
return PS_NOSYM;
static CORE_ADDR
sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr");
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, "elf_bndr");
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
return info->lm_base_cache;
bound_minimal_symbol got_sym
- = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
+ = lookup_minimal_symbol (current_program_space, "_GLOBAL_OFFSET_TABLE_",
current_program_space->symfile_object_file);
if (got_sym.minsym != 0)
return lm_base_cache;
bound_minimal_symbol got_sym
- = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
+ = lookup_minimal_symbol (current_program_space, "_GLOBAL_OFFSET_TABLE_",
current_program_space->symfile_object_file);
if (got_sym.minsym == 0)
{
{
objfile *objf = current_program_space->symfile_object_file;
bound_minimal_symbol got_sym
- = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", objf);
+ = lookup_minimal_symbol (current_program_space, "_GLOBAL_OFFSET_TABLE_",
+ objf);
if (got_sym.minsym == 0)
return 0;
/* This may be a static executable. Look for the symbol
conventionally named _r_debug, as a last resort. */
bound_minimal_symbol msymbol
- = lookup_minimal_symbol ("_r_debug",
+ = lookup_minimal_symbol (current_program_space, "_r_debug",
current_program_space->symfile_object_file);
if (msymbol.minsym != NULL)
return msymbol.value_address ();
objfile *objf = current_program_space->symfile_object_file;
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol (*bkpt_namep, objf);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, *bkpt_namep, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{
for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
{
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (*bkpt_namep, objf);
+ = lookup_minimal_symbol (current_program_space, *bkpt_namep, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{
enum bfd_endian byte_order;
simple_free_overlay_table ();
- bound_minimal_symbol novlys_msym = lookup_minimal_symbol ("_novlys");
+ bound_minimal_symbol novlys_msym
+ = lookup_minimal_symbol (current_program_space, "_novlys");
if (! novlys_msym.minsym)
{
error (_("Error reading inferior's overlay table: "
return 0;
}
- bound_minimal_symbol ovly_table_msym = lookup_minimal_symbol ("_ovly_table");
+ bound_minimal_symbol ovly_table_msym
+ = lookup_minimal_symbol (current_program_space, "_ovly_table");
if (! ovly_table_msym.minsym)
{
error (_("Error reading inferior's overlay table: couldn't find "
{
/* Does its cached location match what's currently in the
symtab? */
- bound_minimal_symbol minsym = lookup_minimal_symbol ("_ovly_table");
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (current_program_space, "_ovly_table");
if (minsym.minsym == NULL)
error (_("Error reading inferior's overlay table: couldn't "
case LOC_UNRESOLVED:
{
bound_minimal_symbol msym
- = lookup_minimal_symbol (sym->linkage_name ());
+ = lookup_minimal_symbol (current_program_space,
+ sym->linkage_name ());
if (msym.minsym == NULL)
gdb_printf ("Unresolved Static");
else
if (addr == 0)
{
bound_minimal_symbol main_symbol
- = lookup_minimal_symbol (main_name ());
+ = lookup_minimal_symbol (current_program_space, main_name ());
if (main_symbol.minsym != nullptr)
addr = main_symbol.value_address ();
}
}
else
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, name);
if (msymbol.minsym != NULL)
{
{
/* With some compilers, e.g. HP aCC, static data members are
reported as non-debuggable symbols. */
- bound_minimal_symbol msym = lookup_minimal_symbol (phys_name);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, phys_name);
struct type *field_type = type->field (fieldno).type ();
if (!msym.minsym)
nullptr).symbol;
if (sym == nullptr)
{
- msym = lookup_minimal_symbol (physname);
+ msym = lookup_minimal_symbol (current_program_space, physname);
if (msym.minsym == NULL)
return NULL;
}
/* stage2: check for FP saving scheme */
if (prologue[pos] == 0xcd) /* call nn */
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol ("__sdcc_enter_ix");
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, "__sdcc_enter_ix");
if (msymbol.minsym)
{
value = msymbol.value_address ();
for (i = sizeof(names)/sizeof(*names)-1; i >= 0; --i)
{
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (names[i]);
+ = lookup_minimal_symbol (current_program_space, names[i]);
if (!msymbol.minsym)
continue;
if (addr == msymbol.value_address ())
static int addr = -1;
if (addr == -1)
{
- bound_minimal_symbol bh = lookup_minimal_symbol ("_break_handler");
+ bound_minimal_symbol bh
+ = lookup_minimal_symbol (current_program_space, "_break_handler");
if (bh.minsym)
addr = bh.value_address ();
else
z80_free_overlay_region_table ();
bound_minimal_symbol novly_regions_msym
- = lookup_minimal_symbol ("_novly_regions");
+ = lookup_minimal_symbol (current_program_space, "_novly_regions");
if (! novly_regions_msym.minsym)
{
error (_("Error reading inferior's overlay table: "
}
bound_minimal_symbol ovly_region_table_msym
- = lookup_minimal_symbol ("_ovly_region_table");
+ = lookup_minimal_symbol (current_program_space, "_ovly_region_table");
if (! ovly_region_table_msym.minsym)
{
error (_("Error reading inferior's overlay table: couldn't find "