mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
gdb: make lookup_minimal_symbol objf and sfile parameters optional
Most calls to lookup_minimal_symbol don't pass a value for sfile and objf. Make these parameters optional (have a default value of nullptr). And since passing a value to `objf` is much more common than passing a value to `sfile`, swap the order so `objf` comes first, to avoid having to pass a nullptr value to `sfile` when wanting to pass a value to `objf`. Change-Id: I8e9cc6b942e593bec640f9dfd30f62786b0f5a27 Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
committed by
Simon Marchi
parent
03b40f6f55
commit
c8979ae4fb
@@ -806,7 +806,7 @@ ada_main_name ()
|
||||
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, NULL, NULL);
|
||||
= lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME);
|
||||
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
@@ -11696,7 +11696,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
|
||||
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, NULL, NULL);
|
||||
= lookup_minimal_symbol (einfo->catch_exception_sym);
|
||||
|
||||
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
|
||||
error (_("Your Ada runtime appears to be missing some debugging "
|
||||
@@ -11716,7 +11716,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
|
||||
if (sym == NULL)
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (einfo->catch_handlers_sym, NULL, NULL);
|
||||
= lookup_minimal_symbol (einfo->catch_handlers_sym);
|
||||
|
||||
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
|
||||
error (_("Your Ada runtime appears to be missing some debugging "
|
||||
|
||||
@@ -920,8 +920,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
|
||||
|
||||
/* Try array. */
|
||||
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (KNOWN_TASKS_NAME);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
data->known_tasks_kind = ADA_TASKS_ARRAY;
|
||||
@@ -968,7 +967,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
|
||||
|
||||
/* Try list. */
|
||||
|
||||
msym = lookup_minimal_symbol (KNOWN_TASKS_LIST, NULL, NULL);
|
||||
msym = lookup_minimal_symbol (KNOWN_TASKS_LIST);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
data->known_tasks_kind = ADA_TASKS_LIST;
|
||||
|
||||
@@ -395,7 +395,7 @@ pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int co
|
||||
symbols[i].addr = 0;
|
||||
else
|
||||
{
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (name);
|
||||
if (ms.minsym == NULL)
|
||||
{
|
||||
if (debug_aix_thread)
|
||||
@@ -978,7 +978,7 @@ pd_enable (inferior *inf)
|
||||
return;
|
||||
|
||||
/* Set a breakpoint on the returned stub function. */
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (stub_name, NULL, NULL);
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (stub_name);
|
||||
if (ms.minsym == NULL)
|
||||
return;
|
||||
data->pd_brk_addr = ms.value_address ();
|
||||
|
||||
@@ -506,8 +506,7 @@ arc_linux_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
|
||||
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", NULL, NULL);
|
||||
bound_minimal_symbol resolver = lookup_minimal_symbol ("_dl_linux_resolver");
|
||||
|
||||
if (arc_debug)
|
||||
{
|
||||
|
||||
@@ -9388,8 +9388,7 @@ arm_skip_cmse_entry (CORE_ADDR pc, const char *name, struct objfile *objfile)
|
||||
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, NULL, objfile);
|
||||
bound_minimal_symbol minsym = lookup_minimal_symbol (target_name, objfile);
|
||||
if (minsym.minsym != nullptr)
|
||||
return minsym.value_address ();
|
||||
|
||||
@@ -9478,7 +9477,7 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
sec = find_pc_section (pc);
|
||||
objfile = (sec == NULL) ? NULL : sec->objfile;
|
||||
bound_minimal_symbol minsym
|
||||
= lookup_minimal_symbol (target_name, NULL, objfile);
|
||||
= lookup_minimal_symbol (target_name, objfile);
|
||||
if (minsym.minsym != NULL)
|
||||
return minsym.value_address ();
|
||||
else
|
||||
|
||||
@@ -90,7 +90,7 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
|
||||
LONGEST retval;
|
||||
size_t block;
|
||||
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv");
|
||||
if (msym.minsym == NULL)
|
||||
return TARGET_XFER_E_IO;
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||
pc_offset += 2;
|
||||
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
|
||||
= lookup_minimal_symbol ("__prologue_saves__");
|
||||
if (!msymbol.minsym)
|
||||
break;
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
|
||||
case LOC_UNRESOLVED:
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (var->linkage_name (), NULL, NULL);
|
||||
= lookup_minimal_symbol (var->linkage_name ());
|
||||
if (!msym.minsym)
|
||||
error (_("Couldn't resolve symbol `%s'."), var->print_name ());
|
||||
|
||||
|
||||
@@ -3752,7 +3752,7 @@ create_std_terminate_master_breakpoint (void)
|
||||
if (bp_objfile_data->terminate_msym.minsym == NULL)
|
||||
{
|
||||
bound_minimal_symbol m
|
||||
= lookup_minimal_symbol (func_name, NULL, objfile);
|
||||
= lookup_minimal_symbol (func_name, objfile);
|
||||
if (m.minsym == NULL || (m.minsym->type () != mst_text
|
||||
&& m.minsym->type () != mst_file_text))
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ static int bsd_uthread_active;
|
||||
static CORE_ADDR
|
||||
bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
|
||||
{
|
||||
bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
|
||||
bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
|
||||
if (sym.minsym)
|
||||
return sym.value_address ();
|
||||
|
||||
|
||||
@@ -3150,7 +3150,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
|
||||
if (bsym.symbol == NULL
|
||||
&& par_state->language ()->la_language == language_cplus
|
||||
&& is_a_field_of_this.type == NULL
|
||||
&& lookup_minimal_symbol (copy.c_str (), NULL, NULL).minsym == NULL)
|
||||
&& lookup_minimal_symbol (copy.c_str ()).minsym == nullptr)
|
||||
return UNKNOWN_CPP_NAME;
|
||||
|
||||
return NAME;
|
||||
|
||||
@@ -579,7 +579,7 @@ coff_read_minsyms (file_ptr symtab_offset, unsigned int nsyms,
|
||||
name1 += 1;
|
||||
|
||||
bound_minimal_symbol found
|
||||
= lookup_minimal_symbol (name1, NULL, objfile);
|
||||
= lookup_minimal_symbol (name1, objfile);
|
||||
|
||||
/* If found, there are symbols named "_imp_foo" and "foo"
|
||||
respectively in OBJFILE. Set the type of symbol "foo"
|
||||
|
||||
@@ -355,8 +355,7 @@ gcc_convert_symbol (void *datum,
|
||||
}
|
||||
else if (request == GCC_C_ORACLE_SYMBOL)
|
||||
{
|
||||
bound_minimal_symbol bmsym
|
||||
= lookup_minimal_symbol (identifier, NULL, NULL);
|
||||
bound_minimal_symbol bmsym = lookup_minimal_symbol (identifier);
|
||||
if (bmsym.minsym != NULL)
|
||||
{
|
||||
convert_symbol_bmsym (context, bmsym);
|
||||
|
||||
@@ -764,8 +764,7 @@ compile_object_load (const compile_file_names &file_names,
|
||||
continue;
|
||||
}
|
||||
|
||||
bound_minimal_symbol bmsym
|
||||
= lookup_minimal_symbol (sym->name, NULL, NULL);
|
||||
bound_minimal_symbol bmsym = lookup_minimal_symbol (sym->name);
|
||||
switch (bmsym.minsym == NULL
|
||||
? mst_unknown : bmsym.minsym->type ())
|
||||
{
|
||||
|
||||
@@ -323,7 +323,7 @@ get_bitsize (ctf_dict_t *fp, ctf_id_t tid, uint32_t kind)
|
||||
static void
|
||||
set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, nullptr, of);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, of);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
sym->set_value_address (msym.value_address ());
|
||||
|
||||
@@ -38,7 +38,7 @@ static const char D_MAIN[] = "D main";
|
||||
const char *
|
||||
d_main_name (void)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN);
|
||||
if (msym.minsym != NULL)
|
||||
return D_MAIN;
|
||||
|
||||
|
||||
@@ -907,7 +907,7 @@ find_stab_function (const char *namestring, const char *filename,
|
||||
strncpy (p, namestring, n);
|
||||
p[n] = 0;
|
||||
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (p, filename, objfile);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (p, objfile, filename);
|
||||
if (msym.minsym == NULL)
|
||||
{
|
||||
/* Sun Fortran appends an underscore to the minimal symbol name,
|
||||
@@ -915,21 +915,21 @@ find_stab_function (const char *namestring, const char *filename,
|
||||
was not found. */
|
||||
p[n] = '_';
|
||||
p[n + 1] = 0;
|
||||
msym = lookup_minimal_symbol (p, filename, objfile);
|
||||
msym = lookup_minimal_symbol (p, objfile, filename);
|
||||
}
|
||||
|
||||
if (msym.minsym == NULL && filename != NULL)
|
||||
{
|
||||
/* Try again without the filename. */
|
||||
p[n] = 0;
|
||||
msym = lookup_minimal_symbol (p, NULL, objfile);
|
||||
msym = lookup_minimal_symbol (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, NULL, objfile);
|
||||
msym = lookup_minimal_symbol (p, objfile);
|
||||
}
|
||||
|
||||
return msym;
|
||||
@@ -2044,7 +2044,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
|
||||
p[n] = 0;
|
||||
|
||||
bound_minimal_symbol minsym
|
||||
= lookup_minimal_symbol (p, pst->filename, objfile);
|
||||
= lookup_minimal_symbol (p, objfile, pst->filename);
|
||||
if (minsym.minsym == NULL)
|
||||
{
|
||||
/* Sun Fortran appends an underscore to the minimal symbol name,
|
||||
@@ -2052,7 +2052,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
|
||||
was not found. */
|
||||
p[n] = '_';
|
||||
p[n + 1] = 0;
|
||||
minsym = lookup_minimal_symbol (p, pst->filename, objfile);
|
||||
minsym = lookup_minimal_symbol (p, objfile, pst->filename);
|
||||
}
|
||||
|
||||
if (minsym.minsym)
|
||||
|
||||
@@ -710,8 +710,7 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
|
||||
physname = m_loc.physname;
|
||||
|
||||
/* Handle both the mangled and demangled PHYSNAME. */
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (physname, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (physname);
|
||||
if (msym.minsym == NULL)
|
||||
{
|
||||
msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
|
||||
|
||||
@@ -842,9 +842,9 @@ elf_gnu_ifunc_resolve_by_got (const char *name, CORE_ADDR *addr_p)
|
||||
CORE_ADDR pointer_address, addr;
|
||||
asection *plt;
|
||||
gdb_byte *buf = (gdb_byte *) alloca (ptr_size);
|
||||
bound_minimal_symbol msym;
|
||||
|
||||
msym = lookup_minimal_symbol (name_got_plt, NULL, objfile);
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (name_got_plt, objfile);
|
||||
if (msym.minsym == NULL)
|
||||
return 0;
|
||||
if (msym.minsym->type () != mst_slot_got_plt)
|
||||
|
||||
@@ -1954,7 +1954,7 @@ eval_op_objc_msgcall (struct type *expect_type, struct expression *exp,
|
||||
if (value_as_long (target) == 0)
|
||||
return value_from_longest (long_type, 0);
|
||||
|
||||
if (lookup_minimal_symbol ("objc_msg_lookup", 0, 0).minsym)
|
||||
if (lookup_minimal_symbol ("objc_msg_lookup").minsym != nullptr)
|
||||
gnu_runtime = 1;
|
||||
|
||||
/* Find the method dispatch (Apple runtime) or method lookup
|
||||
|
||||
@@ -1943,7 +1943,7 @@ fbsd_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread)
|
||||
static LONGEST
|
||||
fbsd_read_integer_by_name (struct gdbarch *gdbarch, const char *name)
|
||||
{
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (name);
|
||||
if (ms.minsym == NULL)
|
||||
error (_("Unable to resolve symbol '%s'"), name);
|
||||
|
||||
|
||||
@@ -449,8 +449,7 @@ language_defn::read_var_value (struct symbol *var,
|
||||
(var->arch (),
|
||||
[var, &bmsym] (objfile *objfile)
|
||||
{
|
||||
bmsym = lookup_minimal_symbol (var->linkage_name (), nullptr,
|
||||
objfile);
|
||||
bmsym = lookup_minimal_symbol (var->linkage_name (), objfile);
|
||||
|
||||
/* Stop if a match is found. */
|
||||
return bmsym.minsym != nullptr;
|
||||
|
||||
@@ -2584,8 +2584,7 @@ inside_main_func (const frame_info_ptr &this_frame)
|
||||
CORE_ADDR sym_addr = 0;
|
||||
const char *name = main_name ();
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol (name, NULL,
|
||||
current_program_space->symfile_object_file);
|
||||
= lookup_minimal_symbol (name, current_program_space->symfile_object_file);
|
||||
|
||||
if (msymbol.minsym != nullptr)
|
||||
sym_addr = msymbol.value_address ();
|
||||
|
||||
@@ -1379,8 +1379,7 @@ frv_frame_this_id (const frame_info_ptr &this_frame,
|
||||
func = get_frame_func (this_frame);
|
||||
|
||||
/* Check if the stack is empty. */
|
||||
bound_minimal_symbol msym_stack
|
||||
= lookup_minimal_symbol ("_stack", NULL, NULL);
|
||||
bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
|
||||
if (msym_stack.minsym && info->base == msym_stack.value_address ())
|
||||
return;
|
||||
|
||||
|
||||
@@ -195,8 +195,7 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
|
||||
|
||||
snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
|
||||
regnum);
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol (prolog_symbol, NULL, NULL);
|
||||
bound_minimal_symbol msymbol = lookup_minimal_symbol (prolog_symbol);
|
||||
if (msymbol.minsym)
|
||||
prologs[regnum] = msymbol.value_address ();
|
||||
else
|
||||
|
||||
@@ -269,13 +269,13 @@ call_target_sbrk (int sbrk_arg)
|
||||
struct value *sbrk_fn, *ret;
|
||||
bfd_vma tmp;
|
||||
|
||||
if (lookup_minimal_symbol ("sbrk", NULL, NULL).minsym != NULL)
|
||||
if (lookup_minimal_symbol ("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", NULL, NULL).minsym != NULL)
|
||||
else if (lookup_minimal_symbol ("_sbrk").minsym != nullptr)
|
||||
{
|
||||
sbrk_fn = find_function_in_inferior ("_sbrk", &sbrk_objf);
|
||||
if (sbrk_fn == NULL)
|
||||
|
||||
@@ -59,11 +59,11 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
/* The dynamic linker began using this name in early 2005. */
|
||||
bound_minimal_symbol fixup
|
||||
= lookup_minimal_symbol ("_dl_fixup", NULL, resolver.objfile);
|
||||
|
||||
= lookup_minimal_symbol ("_dl_fixup", resolver.objfile);
|
||||
|
||||
/* This is the name used in older versions. */
|
||||
if (! fixup.minsym)
|
||||
fixup = lookup_minimal_symbol ("fixup", NULL, resolver.objfile);
|
||||
fixup = lookup_minimal_symbol ("fixup", resolver.objfile);
|
||||
|
||||
if (fixup.minsym && fixup.value_address () == pc)
|
||||
return frame_unwind_caller_pc (get_current_frame ());
|
||||
|
||||
@@ -1160,8 +1160,7 @@ gnuv3_get_typeid (struct value *value)
|
||||
else
|
||||
{
|
||||
std::string sym_name = std::string ("typeinfo for ") + name;
|
||||
bound_minimal_symbol minsym
|
||||
= lookup_minimal_symbol (sym_name.c_str (), NULL, NULL);
|
||||
bound_minimal_symbol minsym = lookup_minimal_symbol (sym_name.c_str ());
|
||||
|
||||
if (minsym.minsym == NULL)
|
||||
error (_("could not find typeinfo symbol for '%s'"), name);
|
||||
@@ -1250,7 +1249,7 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
|
||||
|
||||
fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
|
||||
bound_minimal_symbol fn_sym
|
||||
= lookup_minimal_symbol (fn_name, NULL, section->objfile);
|
||||
= lookup_minimal_symbol (fn_name, section->objfile);
|
||||
if (fn_sym.minsym == NULL)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ static const char GO_MAIN_MAIN[] = "main.main";
|
||||
const char *
|
||||
go_main_name (void)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN);
|
||||
if (msym.minsym != NULL)
|
||||
return GO_MAIN_MAIN;
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ hppa_extract_17 (unsigned word)
|
||||
CORE_ADDR
|
||||
hppa_symbol_address(const char *sym)
|
||||
{
|
||||
bound_minimal_symbol minsym = lookup_minimal_symbol (sym, NULL, NULL);
|
||||
bound_minimal_symbol minsym = lookup_minimal_symbol (sym);
|
||||
if (minsym.minsym)
|
||||
return minsym.value_address ();
|
||||
else
|
||||
|
||||
@@ -484,10 +484,9 @@ inferior_call_waitpid (ptid_t pptid, int pid)
|
||||
scoped_switch_fork_info switch_fork_info (pptid);
|
||||
|
||||
/* Get the waitpid_fn. */
|
||||
if (lookup_minimal_symbol ("waitpid", NULL, NULL).minsym != NULL)
|
||||
if (lookup_minimal_symbol ("waitpid").minsym != nullptr)
|
||||
waitpid_fn = find_function_in_inferior ("waitpid", &waitpid_objf);
|
||||
if (!waitpid_fn
|
||||
&& lookup_minimal_symbol ("_waitpid", NULL, NULL).minsym != NULL)
|
||||
if (!waitpid_fn && lookup_minimal_symbol ("_waitpid").minsym != nullptr)
|
||||
waitpid_fn = find_function_in_inferior ("_waitpid", &waitpid_objf);
|
||||
if (waitpid_fn != nullptr)
|
||||
{
|
||||
@@ -701,10 +700,10 @@ checkpoint_command (const char *args, int from_tty)
|
||||
|
||||
/* Make the inferior fork, record its (and gdb's) state. */
|
||||
|
||||
if (lookup_minimal_symbol ("fork", NULL, NULL).minsym != NULL)
|
||||
if (lookup_minimal_symbol ("fork").minsym != nullptr)
|
||||
fork_fn = find_function_in_inferior ("fork", &fork_objf);
|
||||
if (!fork_fn)
|
||||
if (lookup_minimal_symbol ("_fork", NULL, NULL).minsym != NULL)
|
||||
if (lookup_minimal_symbol ("_fork").minsym != nullptr)
|
||||
fork_fn = find_function_in_inferior ("fork", &fork_objf);
|
||||
if (!fork_fn)
|
||||
error (_("checkpoint: can't find fork function in inferior."));
|
||||
|
||||
@@ -470,8 +470,7 @@ inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min)
|
||||
CORE_ADDR version_addr;
|
||||
int got, retval = 0;
|
||||
|
||||
bound_minimal_symbol version_msym
|
||||
= lookup_minimal_symbol (ver_symbol, NULL, NULL);
|
||||
bound_minimal_symbol version_msym = lookup_minimal_symbol (ver_symbol);
|
||||
if (version_msym.minsym == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -810,9 +809,7 @@ static bool
|
||||
libpthread_objfile_p (objfile *obj)
|
||||
{
|
||||
return (libpthread_name_p (objfile_name (obj))
|
||||
&& lookup_minimal_symbol ("pthread_create",
|
||||
NULL,
|
||||
obj).minsym != NULL);
|
||||
&& lookup_minimal_symbol ("pthread_create", obj).minsym != nullptr);
|
||||
}
|
||||
|
||||
/* Attempt to initialize dlopen()ed libthread_db, described by INFO.
|
||||
|
||||
@@ -2212,8 +2212,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||
/* 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", NULL, NULL);
|
||||
bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
|
||||
|
||||
if (! mem0.minsym)
|
||||
error (_("The return value is stored in memory at 'mem0', "
|
||||
@@ -2244,8 +2243,7 @@ m32c_return_value (struct gdbarch *gdbarch,
|
||||
/* 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", NULL, NULL);
|
||||
bound_minimal_symbol mem0 = lookup_minimal_symbol ("mem0");
|
||||
|
||||
if (! mem0.minsym)
|
||||
error (_("The return value is stored in memory at 'mem0', "
|
||||
@@ -2436,8 +2434,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
|
||||
strcat (tramp_name, ".plt");
|
||||
|
||||
/* Try to find a linker symbol for the trampoline. */
|
||||
bound_minimal_symbol tramp_msym
|
||||
= lookup_minimal_symbol (tramp_name, NULL, NULL);
|
||||
bound_minimal_symbol tramp_msym = lookup_minimal_symbol (tramp_name);
|
||||
|
||||
/* We've either got another copy of the name now, or don't need
|
||||
the name any more. */
|
||||
@@ -2521,7 +2518,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
|
||||
memcpy (func_name, ptr_msym_name, len - 4);
|
||||
func_name[len - 4] = '\0';
|
||||
bound_minimal_symbol func_msym
|
||||
= lookup_minimal_symbol (func_name, NULL, NULL);
|
||||
= lookup_minimal_symbol (func_name);
|
||||
|
||||
/* If we do have such a symbol, return its value as the
|
||||
function's true address. */
|
||||
|
||||
@@ -806,8 +806,7 @@ m32r_frame_this_id (const frame_info_ptr &this_frame,
|
||||
func = get_frame_func (this_frame);
|
||||
|
||||
/* Check if the stack is empty. */
|
||||
bound_minimal_symbol msym_stack
|
||||
= lookup_minimal_symbol ("_stack", NULL, NULL);
|
||||
bound_minimal_symbol msym_stack = lookup_minimal_symbol ("_stack");
|
||||
if (msym_stack.minsym && info->base == msym_stack.value_address ())
|
||||
return;
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ static int soft_reg_initialized = 0;
|
||||
static void
|
||||
m68hc11_get_register_info (struct m68hc11_soft_reg *reg, const char *name)
|
||||
{
|
||||
bound_minimal_symbol msymbol = lookup_minimal_symbol (name, NULL, NULL);
|
||||
bound_minimal_symbol msymbol = lookup_minimal_symbol (name);
|
||||
if (msymbol.minsym)
|
||||
{
|
||||
reg->addr = msymbol.value_address ();
|
||||
|
||||
@@ -396,7 +396,7 @@ macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
|
||||
&& *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
|
||||
++name;
|
||||
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, NULL, main_objfile);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (name, main_objfile);
|
||||
if (msym.minsym == NULL)
|
||||
{
|
||||
warning (_("can't find symbol '%s' in minsymtab"), name);
|
||||
|
||||
@@ -359,8 +359,7 @@ lookup_minimal_symbol_demangled (const lookup_name_info &lookup_name,
|
||||
but the demangled names are all the same: S::S or S::~S. */
|
||||
|
||||
bound_minimal_symbol
|
||||
lookup_minimal_symbol (const char *name, const char *sfile,
|
||||
struct objfile *objf)
|
||||
lookup_minimal_symbol (const char *name, objfile *objf, const char *sfile)
|
||||
{
|
||||
found_minimal_symbols found;
|
||||
|
||||
@@ -479,7 +478,7 @@ lookup_minimal_symbol (const char *name, const char *sfile,
|
||||
bound_minimal_symbol
|
||||
lookup_bound_minimal_symbol (const char *name)
|
||||
{
|
||||
return lookup_minimal_symbol (name, NULL, NULL);
|
||||
return lookup_minimal_symbol (name);
|
||||
}
|
||||
|
||||
/* See gdbsupport/symbol.h. */
|
||||
@@ -488,7 +487,7 @@ int
|
||||
find_minimal_symbol_address (const char *name, CORE_ADDR *addr,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
|
||||
bound_minimal_symbol sym = lookup_minimal_symbol (name, objfile);
|
||||
if (sym.minsym != NULL)
|
||||
*addr = sym.value_address ();
|
||||
|
||||
|
||||
@@ -205,8 +205,9 @@ unsigned int msymbol_hash_iw (const char *);
|
||||
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 *, const char *,
|
||||
struct objfile *);
|
||||
bound_minimal_symbol lookup_minimal_symbol (const char *name,
|
||||
objfile *obj = nullptr,
|
||||
const char *sfile = nullptr);
|
||||
|
||||
/* Like lookup_minimal_symbol, but searches all files and
|
||||
objfiles. */
|
||||
|
||||
@@ -700,7 +700,7 @@ static CORE_ADDR
|
||||
mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
bound_minimal_symbol resolver
|
||||
= lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
|
||||
= lookup_minimal_symbol ("__dl_runtime_resolve");
|
||||
|
||||
if (resolver.minsym && resolver.value_address () == pc)
|
||||
return frame_unwind_caller_pc (get_current_frame ());
|
||||
|
||||
@@ -348,8 +348,7 @@ nbsd_gdb_signal_to_target (struct gdbarch *gdbarch,
|
||||
static CORE_ADDR
|
||||
nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("_rtld_bind_start");
|
||||
if (msym.minsym && msym.value_address () == pc)
|
||||
return frame_unwind_caller_pc (get_current_frame ());
|
||||
else
|
||||
|
||||
@@ -120,9 +120,9 @@ lookup_objc_class (struct gdbarch *gdbarch, const char *classname)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lookup_minimal_symbol("objc_lookUpClass", 0, 0).minsym)
|
||||
if (lookup_minimal_symbol ("objc_lookUpClass").minsym != nullptr)
|
||||
function = find_function_in_inferior("objc_lookUpClass", NULL);
|
||||
else if (lookup_minimal_symbol ("objc_lookup_class", 0, 0).minsym)
|
||||
else if (lookup_minimal_symbol ("objc_lookup_class").minsym != nullptr)
|
||||
function = find_function_in_inferior("objc_lookup_class", NULL);
|
||||
else
|
||||
{
|
||||
@@ -149,9 +149,9 @@ lookup_child_selector (struct gdbarch *gdbarch, const char *selname)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lookup_minimal_symbol("sel_getUid", 0, 0).minsym)
|
||||
if (lookup_minimal_symbol ("sel_getUid").minsym != nullptr)
|
||||
function = find_function_in_inferior("sel_getUid", NULL);
|
||||
else if (lookup_minimal_symbol ("sel_get_any_uid", 0, 0).minsym)
|
||||
else if (lookup_minimal_symbol ("sel_get_any_uid").minsym != nullptr)
|
||||
function = find_function_in_inferior("sel_get_any_uid", NULL);
|
||||
else
|
||||
{
|
||||
@@ -180,17 +180,18 @@ value_nsstring (struct gdbarch *gdbarch, const char *ptr, int len)
|
||||
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", 0, 0).minsym)
|
||||
if (lookup_minimal_symbol ("_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", 0, 0).minsym)
|
||||
else if (lookup_minimal_symbol ("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:]", 0, 0).minsym)
|
||||
else if (lookup_minimal_symbol ("+[NSString stringWithCString:]").minsym
|
||||
!= nullptr)
|
||||
{
|
||||
function
|
||||
= find_function_in_inferior("+[NSString stringWithCString:]", NULL);
|
||||
@@ -1137,7 +1138,7 @@ find_imps (const char *method, std::vector<const char *> *symbol_names)
|
||||
symbol_names->push_back (sym->natural_name ());
|
||||
else
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (selector, 0, 0);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (selector);
|
||||
|
||||
if (msym.minsym != NULL)
|
||||
symbol_names->push_back (msym.minsym->natural_name ());
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
CORE_ADDR
|
||||
obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind", NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind");
|
||||
if (msym.minsym && msym.value_address () == pc)
|
||||
return frame_unwind_caller_pc (get_current_frame ());
|
||||
else
|
||||
|
||||
@@ -59,21 +59,20 @@ static const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program";
|
||||
const char *
|
||||
pascal_main_name (void)
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (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, NULL, NULL);
|
||||
msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_1);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
return GPC_MAIN_PROGRAM_NAME_1;
|
||||
}
|
||||
|
||||
msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_2, NULL, NULL);
|
||||
msym = lookup_minimal_symbol (GPC_MAIN_PROGRAM_NAME_2);
|
||||
if (msym.minsym != NULL)
|
||||
{
|
||||
return GPC_MAIN_PROGRAM_NAME_2;
|
||||
|
||||
@@ -1060,7 +1060,7 @@ convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
|
||||
- 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, NULL,
|
||||
= lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1,
|
||||
dot_fn_section->objfile);
|
||||
if (fn.minsym == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -99,7 +99,7 @@ ps_pglobal_lookup (struct ps_prochandle *ph, const char *obj,
|
||||
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, NULL, NULL);
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (name);
|
||||
if (ms.minsym == NULL)
|
||||
return PS_NOSYM;
|
||||
|
||||
|
||||
@@ -329,14 +329,13 @@ ravenscar_thread_target::add_active_thread ()
|
||||
static bound_minimal_symbol
|
||||
get_running_thread_msymbol ()
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (running_thread_name, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (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", NULL, NULL);
|
||||
msym = lookup_minimal_symbol ("running_thread");
|
||||
|
||||
return msym;
|
||||
}
|
||||
@@ -348,11 +347,11 @@ static bool
|
||||
has_ravenscar_runtime ()
|
||||
{
|
||||
bound_minimal_symbol msym_ravenscar_runtime_initializer
|
||||
= lookup_minimal_symbol (ravenscar_runtime_initializer, NULL, NULL);
|
||||
= lookup_minimal_symbol (ravenscar_runtime_initializer);
|
||||
bound_minimal_symbol msym_known_tasks
|
||||
= lookup_minimal_symbol (known_tasks_name, NULL, NULL);
|
||||
= lookup_minimal_symbol (known_tasks_name);
|
||||
bound_minimal_symbol msym_first_task
|
||||
= lookup_minimal_symbol (first_task_name, NULL, NULL);
|
||||
= lookup_minimal_symbol (first_task_name);
|
||||
bound_minimal_symbol msym_running_thread = get_running_thread_msymbol ();
|
||||
|
||||
return (msym_ravenscar_runtime_initializer.minsym
|
||||
|
||||
@@ -5508,8 +5508,7 @@ remote_target::remote_check_symbols ()
|
||||
end = hex2bin (tmp, reinterpret_cast <gdb_byte *> (msg.data ()),
|
||||
strlen (tmp) / 2);
|
||||
msg[end] = '\0';
|
||||
bound_minimal_symbol sym
|
||||
= lookup_minimal_symbol (msg.data (), NULL, NULL);
|
||||
bound_minimal_symbol sym = lookup_minimal_symbol (msg.data ());
|
||||
if (sym.minsym == NULL)
|
||||
xsnprintf (msg.data (), get_remote_packet_size (), "qSymbol::%s",
|
||||
&reply[8]);
|
||||
|
||||
@@ -759,7 +759,7 @@ ps_err_e
|
||||
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, NULL, NULL);
|
||||
bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name);
|
||||
if (!ms.minsym)
|
||||
return PS_NOSYM;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ sol2_sigtramp_p (const frame_info_ptr &this_frame)
|
||||
static CORE_ADDR
|
||||
sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr", NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr");
|
||||
if (msym.minsym && msym.value_address () == pc)
|
||||
return frame_unwind_caller_pc (get_current_frame ());
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ lm_base (void)
|
||||
return info->lm_base_cache;
|
||||
|
||||
bound_minimal_symbol got_sym
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
|
||||
current_program_space->symfile_object_file);
|
||||
|
||||
if (got_sym.minsym != 0)
|
||||
|
||||
@@ -280,7 +280,7 @@ lm_base (void)
|
||||
return lm_base_cache;
|
||||
|
||||
bound_minimal_symbol got_sym
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
|
||||
current_program_space->symfile_object_file);
|
||||
if (got_sym.minsym == 0)
|
||||
{
|
||||
@@ -842,7 +842,7 @@ main_got (void)
|
||||
{
|
||||
objfile *objf = current_program_space->symfile_object_file;
|
||||
bound_minimal_symbol got_sym
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
|
||||
= lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", objf);
|
||||
if (got_sym.minsym == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@ elf_locate_base (void)
|
||||
/* 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", NULL,
|
||||
= lookup_minimal_symbol ("_r_debug",
|
||||
current_program_space->symfile_object_file);
|
||||
if (msymbol.minsym != NULL)
|
||||
return msymbol.value_address ();
|
||||
@@ -2481,8 +2481,7 @@ enable_break (struct svr4_info *info, int from_tty)
|
||||
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, NULL, objf);
|
||||
bound_minimal_symbol msymbol = lookup_minimal_symbol (*bkpt_namep, objf);
|
||||
if ((msymbol.minsym != NULL)
|
||||
&& (msymbol.value_address () != 0))
|
||||
{
|
||||
@@ -2502,7 +2501,7 @@ enable_break (struct svr4_info *info, int from_tty)
|
||||
for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
|
||||
{
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol (*bkpt_namep, NULL, objf);
|
||||
= lookup_minimal_symbol (*bkpt_namep, objf);
|
||||
if ((msymbol.minsym != NULL)
|
||||
&& (msymbol.value_address () != 0))
|
||||
{
|
||||
|
||||
@@ -3433,8 +3433,7 @@ simple_read_overlay_table (void)
|
||||
enum bfd_endian byte_order;
|
||||
|
||||
simple_free_overlay_table ();
|
||||
bound_minimal_symbol novlys_msym
|
||||
= lookup_minimal_symbol ("_novlys", NULL, NULL);
|
||||
bound_minimal_symbol novlys_msym = lookup_minimal_symbol ("_novlys");
|
||||
if (! novlys_msym.minsym)
|
||||
{
|
||||
error (_("Error reading inferior's overlay table: "
|
||||
@@ -3523,8 +3522,7 @@ simple_overlay_update (struct obj_section *osect)
|
||||
{
|
||||
/* Does its cached location match what's currently in the
|
||||
symtab? */
|
||||
bound_minimal_symbol minsym
|
||||
= lookup_minimal_symbol ("_ovly_table", NULL, NULL);
|
||||
bound_minimal_symbol minsym = lookup_minimal_symbol ("_ovly_table");
|
||||
|
||||
if (minsym.minsym == NULL)
|
||||
error (_("Error reading inferior's overlay table: couldn't "
|
||||
|
||||
@@ -2580,8 +2580,7 @@ info_scope_command (const char *args_in, int from_tty)
|
||||
case LOC_UNRESOLVED:
|
||||
{
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (sym->linkage_name (), NULL,
|
||||
NULL);
|
||||
= lookup_minimal_symbol (sym->linkage_name ());
|
||||
if (msym.minsym == NULL)
|
||||
gdb_printf ("Unresolved Static");
|
||||
else
|
||||
|
||||
@@ -403,7 +403,7 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
|
||||
if (addr == 0)
|
||||
{
|
||||
bound_minimal_symbol main_symbol
|
||||
= lookup_minimal_symbol (main_name (), nullptr, nullptr);
|
||||
= lookup_minimal_symbol (main_name ());
|
||||
if (main_symbol.minsym != nullptr)
|
||||
addr = main_symbol.value_address ();
|
||||
}
|
||||
|
||||
@@ -2988,8 +2988,7 @@ value_static_field (struct type *type, int fieldno)
|
||||
{
|
||||
/* 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, NULL, NULL);
|
||||
bound_minimal_symbol msym = lookup_minimal_symbol (phys_name);
|
||||
struct type *field_type = type->field (fieldno).type ();
|
||||
|
||||
if (!msym.minsym)
|
||||
|
||||
@@ -356,8 +356,7 @@ z80_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||
/* stage2: check for FP saving scheme */
|
||||
if (prologue[pos] == 0xcd) /* call nn */
|
||||
{
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
|
||||
bound_minimal_symbol msymbol = lookup_minimal_symbol ("__sdcc_enter_ix");
|
||||
if (msymbol.minsym)
|
||||
{
|
||||
value = msymbol.value_address ();
|
||||
@@ -622,7 +621,7 @@ z80_frame_unwind_cache (const frame_info_ptr &this_frame,
|
||||
for (i = sizeof(names)/sizeof(*names)-1; i >= 0; --i)
|
||||
{
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol (names[i], NULL, NULL);
|
||||
= lookup_minimal_symbol (names[i]);
|
||||
if (!msymbol.minsym)
|
||||
continue;
|
||||
if (addr == msymbol.value_address ())
|
||||
@@ -719,8 +718,7 @@ z80_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||
static int addr = -1;
|
||||
if (addr == -1)
|
||||
{
|
||||
bound_minimal_symbol bh
|
||||
= lookup_minimal_symbol ("_break_handler", NULL, NULL);
|
||||
bound_minimal_symbol bh = lookup_minimal_symbol ("_break_handler");
|
||||
if (bh.minsym)
|
||||
addr = bh.value_address ();
|
||||
else
|
||||
@@ -900,7 +898,7 @@ z80_read_overlay_region_table ()
|
||||
|
||||
z80_free_overlay_region_table ();
|
||||
bound_minimal_symbol novly_regions_msym
|
||||
= lookup_minimal_symbol ("_novly_regions", NULL, NULL);
|
||||
= lookup_minimal_symbol ("_novly_regions");
|
||||
if (! novly_regions_msym.minsym)
|
||||
{
|
||||
error (_("Error reading inferior's overlay table: "
|
||||
|
||||
Reference in New Issue
Block a user