if (block != nullptr)
objfile = block->objfile ();
- struct bound_minimal_symbol msym
+ bound_minimal_symbol msym
= ada_lookup_simple_minsym (decoded_name.c_str (), objfile);
if (msym.minsym != NULL)
{
const char *
ada_main_name ()
{
- struct bound_minimal_symbol msym;
static gdb::unique_xmalloc_ptr<char> main_program_name;
/* For Ada, the name of the main procedure is stored in a specific
extract its address, and then read that string. If we didn't find
that string, then most probably the main procedure is not written
in Ada. */
- msym = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
if (msym.minsym != NULL)
{
specially: "standard__" is first stripped off, and only static and
global symbols are searched. */
-struct bound_minimal_symbol
+bound_minimal_symbol
ada_lookup_simple_minsym (const char *name, struct objfile *objfile)
{
- struct bound_minimal_symbol result;
+ bound_minimal_symbol result;
symbol_name_match_type match_type = name_match_type_from_name (name);
lookup_name_info lookup_name (name, match_type);
the name of the exception being raised (this name is printed in
the catchpoint message, and is also used when trying to catch
a specific exception). We do not handle this case for now. */
- struct bound_minimal_symbol msym
+ bound_minimal_symbol msym
= lookup_minimal_symbol (einfo->catch_exception_sym, NULL, NULL);
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
sym = standard_lookup (einfo->catch_handlers_sym, NULL, SEARCH_VFT);
if (sym == NULL)
{
- struct bound_minimal_symbol msym
+ bound_minimal_symbol msym
= lookup_minimal_symbol (einfo->catch_handlers_sym, NULL, NULL);
if (msym.minsym && msym.minsym->type () != mst_solib_trampoline)
extern block_symbol ada_lookup_encoded_symbol
(const char *name, const struct block *block, domain_search_flags domain);
-extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *,
- objfile *);
+extern bound_minimal_symbol ada_lookup_simple_minsym (const char *, objfile *);
extern int ada_scan_number (const char *, int, LONGEST *, int *);
sizeof (task_info->name) - 1);
else
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol_by_pc (task_id);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (task_id);
if (msym.minsym)
{
const char *full_name = msym.minsym->linkage_name ();
static void
ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
{
- struct bound_minimal_symbol msym;
struct symbol *sym;
/* Return now if already set. */
/* Try array. */
- msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
if (msym.minsym != NULL)
{
data->known_tasks_kind = ADA_TASKS_ARRAY;
static int
pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int count)
{
- struct bound_minimal_symbol ms;
int i;
char *name;
symbols[i].addr = 0;
else
{
- ms = lookup_minimal_symbol (name, NULL, NULL);
+ bound_minimal_symbol ms = lookup_minimal_symbol (name, NULL, NULL);
if (ms.minsym == NULL)
{
if (debug_aix_thread)
{
int status;
char *stub_name;
- struct bound_minimal_symbol ms;
struct aix_thread_variables *data;
if (inf == NULL)
return;
/* Set a breakpoint on the returned stub function. */
- ms = lookup_minimal_symbol (stub_name, NULL, NULL);
+ bound_minimal_symbol ms = lookup_minimal_symbol (stub_name, NULL, NULL);
if (ms.minsym == NULL)
return;
data->pd_brk_addr = ms.value_address ();
if (target_read_memory (pc + 1, buf, sizeof buf) == 0)
{
- struct bound_minimal_symbol s;
CORE_ADDR call_dest;
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
- s = lookup_minimal_symbol_by_pc (call_dest);
+ bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
&& s.minsym->linkage_name () != NULL
&& strcmp (s.minsym->linkage_name (), "__main") == 0)
So we look for the symbol `_dl_linux_resolver', and if we are there,
gdb sets a breakpoint at the return address, and continues. */
- struct bound_minimal_symbol resolver
+ bound_minimal_symbol resolver
= lookup_minimal_symbol ("_dl_linux_resolver", NULL, NULL);
if (arc_debug)
int
arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct bound_minimal_symbol sym;
char type;
arm_displaced_step_copy_insn_closure *dsc = nullptr;
arm_gdbarch_tdep *tdep = gdbarch_tdep<arm_gdbarch_tdep> (gdbarch);
return type == 't';
/* Thumb functions have a "special" bit set in minimal symbols. */
- sym = lookup_minimal_symbol_by_pc (memaddr);
+ bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (memaddr);
if (sym.minsym)
return (MSYMBOL_IS_SPECIAL (sym.minsym));
skip_prologue_function (struct gdbarch *gdbarch, CORE_ADDR pc, int is_thumb)
{
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
- struct bound_minimal_symbol msym;
- msym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym != NULL
&& msym.value_address () == pc
&& msym.minsym->linkage_name () != NULL)
{
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
unsigned int basereg;
- struct bound_minimal_symbol stack_chk_guard;
int offset;
int is_thumb = arm_pc_is_thumb (gdbarch, pc);
CORE_ADDR addr;
if (!addr)
return pc;
- stack_chk_guard = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol stack_chk_guard = lookup_minimal_symbol_by_pc (addr);
/* ADDR must correspond to a symbol whose name is __stack_chk_guard.
Otherwise, this sequence cannot be for stack protector. */
if (stack_chk_guard.minsym == NULL
char *target_name = (char *) alloca (target_len);
xsnprintf (target_name, target_len, "%s%s", "__acle_se_", name);
- struct bound_minimal_symbol minsym
- = lookup_minimal_symbol (target_name, NULL, objfile);
-
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (target_name, NULL, objfile);
if (minsym.minsym != nullptr)
return minsym.value_address ();
{
char *target_name;
int target_len = namelen - 2;
- struct bound_minimal_symbol minsym;
struct objfile *objfile;
struct obj_section *sec;
sec = find_pc_section (pc);
objfile = (sec == NULL) ? NULL : sec->objfile;
- minsym = lookup_minimal_symbol (target_name, NULL, objfile);
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (target_name, NULL, objfile);
if (minsym.minsym != NULL)
return minsym.value_address ();
else
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST indirect;
- struct bound_minimal_symbol indsym;
const char *symname;
CORE_ADDR next_pc;
if (indirect == 0)
return 0;
- indsym = lookup_minimal_symbol_by_pc (indirect);
+ bound_minimal_symbol indsym = lookup_minimal_symbol_by_pc (indirect);
if (indsym.minsym == NULL)
return 0;
long offset = sign_extend (this_instr & 0x000fffff, 23) << 2;
CORE_ADDR call_dest = (pc + 8 + offset) & 0xffffffffU;
- struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
+ bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
&& s.minsym->linkage_name () != NULL
ULONGEST offset,
ULONGEST len, ULONGEST *xfered_len)
{
- struct bound_minimal_symbol msym;
CORE_ADDR data_address, pointer_address;
gdbarch *arch = current_inferior ()->arch ();
type *ptr_type = builtin_type (arch)->builtin_data_ptr;
LONGEST retval;
size_t block;
- msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
+ bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_auxv", NULL, NULL);
if (msym.minsym == NULL)
return TARGET_XFER_E_IO;
int i;
unsigned short insn;
int scan_stage = 0;
- struct bound_minimal_symbol msymbol;
unsigned char prologue[AVR_MAX_PROLOGUE_SIZE];
int vpc = 0;
int len;
body_addr |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
pc_offset += 2;
- msymbol = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
if (!msymbol.minsym)
break;
case LOC_UNRESOLVED:
{
- struct bound_minimal_symbol msym
+ bound_minimal_symbol msym
= lookup_minimal_symbol (var->linkage_name (), NULL, NULL);
-
if (!msym.minsym)
error (_("Couldn't resolve symbol `%s'."), var->print_name ());
if (cs == nullptr)
{
- struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
/* DW_TAG_gnu_call_site will be missing just if GCC could not determine
the call target. */
get_pc_function_start (CORE_ADDR pc)
{
const struct block *bl;
- struct bound_minimal_symbol msymbol;
bl = block_for_pc (pc);
if (bl)
}
}
- msymbol = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym)
{
CORE_ADDR fstart = msymbol.value_address ();
{
struct obj_section *section;
struct symbol *f;
- struct bound_minimal_symbol msymbol;
struct compunit_symtab *compunit_symtab = NULL;
CORE_ADDR mapped_pc;
+ bound_minimal_symbol msymbol;
/* To ensure that the symbol returned belongs to the correct section
(and that the last [random] symbol from the previous section
static struct breakpoint *
create_internal_breakpoint (struct gdbarch *gdbarch,
- struct bound_minimal_symbol &msym, enum bptype type)
+ bound_minimal_symbol &msym, enum bptype type)
{
CORE_ADDR address;
struct breakpoint_objfile_data
{
/* Minimal symbol for "_ovly_debug_event" (if any). */
- struct bound_minimal_symbol overlay_msym;
+ bound_minimal_symbol overlay_msym;
/* Minimal symbol(s) for "longjmp", "siglongjmp", etc. (if any). */
- struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES];
+ bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES];
/* True if we have looked for longjmp probes. */
int longjmp_searched = 0;
std::vector<probe *> longjmp_probes;
/* Minimal symbol for "std::terminate()" (if any). */
- struct bound_minimal_symbol terminate_msym;
+ bound_minimal_symbol terminate_msym;
/* Minimal symbol for "_Unwind_DebugHook" (if any). */
- struct bound_minimal_symbol exception_msym;
+ bound_minimal_symbol exception_msym;
/* True if we have looked for exception probes. */
int exception_searched = 0;
if (bp_objfile_data->overlay_msym.minsym == NULL)
{
- struct bound_minimal_symbol m;
-
- m = lookup_minimal_symbol_text (func_name, objfile);
+ bound_minimal_symbol m
+ = lookup_minimal_symbol_text (func_name, objfile);
if (m.minsym == NULL)
{
/* Avoid future lookups in this objfile. */
func_name = longjmp_names[i];
if (bp_objfile_data->longjmp_msym[i].minsym == NULL)
{
- struct bound_minimal_symbol m;
-
- m = lookup_minimal_symbol_text (func_name, objfile);
+ bound_minimal_symbol m
+ = lookup_minimal_symbol_text (func_name, objfile);
if (m.minsym == NULL)
{
/* Prevent future lookups in this objfile. */
if (bp_objfile_data->terminate_msym.minsym == NULL)
{
- struct bound_minimal_symbol m;
-
- m = lookup_minimal_symbol (func_name, NULL, objfile);
+ bound_minimal_symbol m
+ = lookup_minimal_symbol (func_name, NULL, objfile);
if (m.minsym == NULL || (m.minsym->type () != mst_text
&& m.minsym->type () != mst_file_text))
{
if (bp_objfile_data->exception_msym.minsym == NULL)
{
- struct bound_minimal_symbol debug_hook;
-
- debug_hook = lookup_minimal_symbol_text (func_name, objfile);
+ bound_minimal_symbol debug_hook
+ = lookup_minimal_symbol_text (func_name, objfile);
if (debug_hook.minsym == NULL)
{
bp_objfile_data->exception_msym.minsym = &msym_not_found;
static CORE_ADDR
bsd_uthread_lookup_address (const char *name, struct objfile *objfile)
{
- struct bound_minimal_symbol sym;
-
- sym = lookup_minimal_symbol (name, NULL, objfile);
+ bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
if (sym.minsym)
return sym.value_address ();
static struct btrace_function *
ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
{
- struct bound_minimal_symbol bmfun;
struct minimal_symbol *mfun;
struct symbol *fun;
struct btrace_function *bfun;
to avoid surprises when we sometimes get a full symbol and sometimes
only a minimal symbol. */
fun = find_pc_function (pc);
- bmfun = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
mfun = bmfun.minsym;
if (fun == NULL && mfun == NULL)
{
/* Print vtbl's nicely. */
CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
- struct bound_minimal_symbol msymbol =
- lookup_minimal_symbol_by_pc (vt_address);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (vt_address);
/* If 'symbol_print' is set, we did the work above. */
if (!options->symbol_print
const char *forward_func_name, int ordinal,
const char *dll_name, struct objfile *objfile)
{
- struct bound_minimal_symbol msymbol;
enum minimal_symbol_type msymtype;
int forward_dll_name_len = strlen (forward_dll_name);
short section;
forward_dll_name,
forward_func_name);
- msymbol = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
-
+ bound_minimal_symbol msymbol
+ = lookup_bound_minimal_symbol (forward_qualified_name.c_str ());
if (!msymbol.minsym)
{
int i;
{
int lead
= bfd_get_symbol_leading_char (objfile->obfd.get ());
- struct bound_minimal_symbol found;
if (lead != '\0' && *name1 == lead)
name1 += 1;
- found = lookup_minimal_symbol (name1, NULL, objfile);
+ bound_minimal_symbol found
+ = lookup_minimal_symbol (name1, NULL, objfile);
/* If found, there are symbols named "_imp_foo" and "foo"
respectively in OBJFILE. Set the type of symbol "foo"
to use and BMSYM is the minimal symbol to convert. */
static void
-convert_symbol_bmsym (compile_c_instance *context,
- struct bound_minimal_symbol bmsym)
+convert_symbol_bmsym (compile_c_instance *context, bound_minimal_symbol bmsym)
{
struct minimal_symbol *msym = bmsym.minsym;
struct objfile *objfile = bmsym.objfile;
}
else if (request == GCC_C_ORACLE_SYMBOL)
{
- struct bound_minimal_symbol bmsym;
-
- bmsym = lookup_minimal_symbol (identifier, NULL, NULL);
+ bound_minimal_symbol bmsym
+ = lookup_minimal_symbol (identifier, NULL, NULL);
if (bmsym.minsym != NULL)
{
convert_symbol_bmsym (context, bmsym);
}
else
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_bound_minimal_symbol (identifier);
+ bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
if (msym.minsym != NULL)
{
if (compile_debug)
static void
convert_symbol_bmsym (compile_cplus_instance *instance,
- struct bound_minimal_symbol bmsym)
+ bound_minimal_symbol bmsym)
{
struct minimal_symbol *msym = bmsym.minsym;
struct objfile *objfile = bmsym.objfile;
}
else
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_bound_minimal_symbol (identifier);
+ bound_minimal_symbol msym = lookup_bound_minimal_symbol (identifier);
if (msym.minsym != nullptr)
{
if (compile_debug)
CORE_ADDR regs_addr, out_value_addr = 0;
struct symbol *func_sym;
struct type *func_type;
- struct bound_minimal_symbol bmsym;
long storage_needed;
asymbol **symbol_table, **symp;
long number_of_symbols, missing_symbols;
continue;
}
- bmsym = lookup_minimal_symbol (sym->name, NULL, NULL);
+ bound_minimal_symbol bmsym
+ = lookup_minimal_symbol (sym->name, NULL, NULL);
switch (bmsym.minsym == NULL
? mst_unknown : bmsym.minsym->type ())
{
func_size = bl->end () - bl->start ();
else
{
- struct bound_minimal_symbol msymbol
+ bound_minimal_symbol msymbol
= lookup_minimal_symbol_by_pc (prologue_start);
if (msymbol.minsym != NULL)
func_size = msymbol.minsym->size ();
static void
set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol (name, nullptr, of);
+ bound_minimal_symbol msym = lookup_minimal_symbol (name, nullptr, of);
if (msym.minsym != NULL)
{
sym->set_value_address (msym.value_address ());
'(' Expression ')'
{ /* Do nothing. */ }
| IdentifierExp
- { struct bound_minimal_symbol msymbol;
+ {
std::string copy = copy_name ($1);
struct field_of_this_result is_a_field_of_this;
struct block_symbol sym;
else
{
/* Lookup foreign name in global static symbols. */
- msymbol = lookup_bound_minimal_symbol (copy.c_str ());
+ bound_minimal_symbol msymbol
+ = lookup_bound_minimal_symbol (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)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
+ bound_minimal_symbol msym = lookup_minimal_symbol (D_MAIN, NULL, NULL);
if (msym.minsym != NULL)
return D_MAIN;
return namestring;
}
-static struct bound_minimal_symbol
+static bound_minimal_symbol
find_stab_function (const char *namestring, const char *filename,
struct objfile *objfile)
{
- struct bound_minimal_symbol msym;
int n;
const char *colon = strchr (namestring, ':');
strncpy (p, namestring, n);
p[n] = 0;
- msym = lookup_minimal_symbol (p, filename, objfile);
+ bound_minimal_symbol msym = lookup_minimal_symbol (p, filename, objfile);
if (msym.minsym == NULL)
{
/* Sun Fortran appends an underscore to the minimal symbol name,
if (nlist.n_value == 0
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
- struct bound_minimal_symbol minsym
+ bound_minimal_symbol minsym
= find_stab_function (namestring,
- pst ? pst->filename : NULL,
- objfile);
+ pst ? pst->filename : NULL, objfile);
if (minsym.minsym != NULL)
nlist.n_value
= CORE_ADDR (minsym.minsym->unrelocated_address ());
if (nlist.n_value == 0
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
- struct bound_minimal_symbol minsym
+ bound_minimal_symbol minsym
= find_stab_function (namestring,
- pst ? pst->filename : NULL,
- objfile);
+ pst ? pst->filename : NULL, objfile);
if (minsym.minsym != NULL)
nlist.n_value
= CORE_ADDR (minsym.minsym->unrelocated_address ());
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
int n;
- struct bound_minimal_symbol minsym;
const char *colon = strchr (last_function_name, ':');
if (colon == NULL)
strncpy (p, last_function_name, n);
p[n] = 0;
- minsym = lookup_minimal_symbol (p, pst->filename, objfile);
+ bound_minimal_symbol minsym
+ = lookup_minimal_symbol (p, pst->filename, objfile);
if (minsym.minsym == NULL)
{
/* Sun Fortran appends an underscore to the minimal symbol name,
&& valu == section_offsets[SECT_OFF_TEXT (objfile)]
&& gdbarch_sofun_address_maybe_missing (gdbarch))
{
- struct bound_minimal_symbol minsym
+ bound_minimal_symbol minsym
= find_stab_function (name, get_last_source_file (),
objfile);
if (minsym.minsym != NULL)
domain_search_flags domain) override;
struct compunit_symtab *find_pc_sect_compunit_symtab
- (struct objfile *objfile, struct bound_minimal_symbol msymbol,
+ (struct objfile *objfile, bound_minimal_symbol msymbol,
CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override
{
wait (objfile, true);
dwarf_block = m_loc.dwarf_block;
if (dwarf_block == NULL)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
throw_error (NO_ENTRY_VALUE_ERROR,
_("DW_AT_call_target is not specified at %s in %s"),
paddress (call_site_gdbarch, call_site->pc ()),
}
if (caller_frame == NULL)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
throw_error (NO_ENTRY_VALUE_ERROR,
_("DW_AT_call_target DWARF block resolving "
"requires known frame which is currently not "
case call_site_target::PHYSNAME:
{
const char *physname;
- struct bound_minimal_symbol msym;
physname = m_loc.physname;
/* Handle both the mangled and demangled PHYSNAME. */
- msym = lookup_minimal_symbol (physname, NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (physname, NULL, NULL);
if (msym.minsym == NULL)
{
msym = lookup_minimal_symbol_by_pc (call_site->pc () - 1);
{
if (target_addr == verify_addr)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol_by_pc (verify_addr);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol_by_pc (verify_addr);
throw_error (NO_ENTRY_VALUE_ERROR,
_("DW_OP_entry_value resolving has found "
"function \"%s\" at %s can call itself via tail "
tailcall_dump (struct gdbarch *gdbarch, const struct call_site *call_site)
{
CORE_ADDR addr = call_site->pc ();
- struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr - 1);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr - 1);
gdb_printf (gdb_stdlog, " %s(%s)", paddress (gdbarch, addr),
(msym.minsym == NULL ? "???"
if (retval == NULL)
{
- struct bound_minimal_symbol msym_caller, msym_callee;
-
- msym_caller = lookup_minimal_symbol_by_pc (caller_pc);
- msym_callee = lookup_minimal_symbol_by_pc (callee_pc);
+ bound_minimal_symbol msym_caller
+ = lookup_minimal_symbol_by_pc (caller_pc);
+ bound_minimal_symbol msym_callee
+ = lookup_minimal_symbol_by_pc (callee_pc);
throw_error (NO_ENTRY_VALUE_ERROR,
_("There are no unambiguously determinable intermediate "
"callers or callees between caller function \"%s\" at %s "
caller_frame = get_prev_frame (frame);
if (gdbarch != frame_unwind_arch (frame))
{
- struct bound_minimal_symbol msym
- = lookup_minimal_symbol_by_pc (func_addr);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (func_addr);
struct gdbarch *caller_gdbarch = frame_unwind_arch (frame);
throw_error (NO_ENTRY_VALUE_ERROR,
if (caller_frame == NULL)
{
- struct bound_minimal_symbol msym
- = lookup_minimal_symbol_by_pc (func_addr);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (func_addr);
throw_error (NO_ENTRY_VALUE_ERROR, _("DW_OP_entry_value resolving "
"requires caller of %s (%s)"),
struct compunit_symtab *
dwarf2_base_index_functions::find_pc_sect_compunit_symtab
(struct objfile *objfile,
- struct bound_minimal_symbol msymbol,
+ bound_minimal_symbol msymbol,
CORE_ADDR pc,
struct obj_section *section,
int warn_if_readin)
void expand_all_symtabs (struct objfile *objfile) override;
struct compunit_symtab *find_pc_sect_compunit_symtab
- (struct objfile *objfile, struct bound_minimal_symbol msymbol,
+ (struct objfile *objfile, bound_minimal_symbol msymbol,
CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
override;
static int
elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr)
{
- struct bound_minimal_symbol msym;
struct objfile *objfile;
htab_t htab;
struct elf_gnu_ifunc_cache entry_local, *entry_p;
void **slot;
- msym = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (addr);
if (msym.minsym == NULL)
return 0;
if (msym.value_address () != addr)
CORE_ADDR
fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_rtld_bind");
+ bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
{
LONGEST displ;
CORE_ADDR call_dest;
- struct bound_minimal_symbol s;
displ = ((op & 0xfe000000) >> 7) | (op & 0x0003ffff);
if ((displ & 0x00800000) != 0)
displ |= ~((LONGEST) 0x00ffffff);
call_dest = pc + 4 * displ;
- s = lookup_minimal_symbol_by_pc (call_dest);
+ bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
&& s.minsym->linkage_name () != NULL
= frv_frame_unwind_cache (this_frame, this_prologue_cache);
CORE_ADDR base;
CORE_ADDR func;
- struct bound_minimal_symbol msym_stack;
struct frame_id id;
/* The FUNC is easy. */
func = get_frame_func (this_frame);
/* Check if the stack is empty. */
- msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
+ bound_minimal_symbol msym_stack
+ = lookup_minimal_symbol ("_stack", NULL, NULL);
if (msym_stack.minsym && info->base == msym_stack.value_address ())
return;
ULONGEST inst;
int isize = 0;
int regnum, pushreg;
- struct bound_minimal_symbol msymbol;
const int first_saved_reg = 13; /* The first saved register. */
+
/* PROLOGS are addresses of the subroutine prologs, PROLOGS[n]
is the address of __prolog_$rN.
__prolog_$rN pushes registers from 13 through n inclusive.
snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
regnum);
- msymbol = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
if (msymbol.minsym)
prologs[regnum] = msymbol.value_address ();
else
of GNU/Linux will provide a portable, efficient interface for
debugging programs that use shared libraries. */
- struct bound_minimal_symbol resolver
+ bound_minimal_symbol resolver
= lookup_bound_minimal_symbol ("_dl_runtime_resolve");
if (resolver.minsym)
{
/* The dynamic linker began using this name in early 2005. */
- struct bound_minimal_symbol fixup
+ bound_minimal_symbol fixup
= lookup_minimal_symbol ("_dl_fixup", NULL, resolver.objfile);
/* This is the name used in older versions. */
struct type *known_type;
struct type *rtti_type;
CORE_ADDR vtbl;
- struct bound_minimal_symbol minsym;
char *p;
const char *linkage_name;
struct type *btype;
vtbl = value_as_address (value_field (v, known_type_vptr_fieldno));
/* Try to find a symbol that is the vtable. */
- minsym=lookup_minimal_symbol_by_pc(vtbl);
+ bound_minimal_symbol minsym = lookup_minimal_symbol_by_pc (vtbl);
if (minsym.minsym==NULL
|| (linkage_name=minsym.minsym->linkage_name ())==NULL
|| !is_vtable_name (linkage_name))
gnuv3_get_typename_from_type_info (struct value *type_info_ptr)
{
struct gdbarch *gdbarch = type_info_ptr->type ()->arch ();
- struct bound_minimal_symbol typeinfo_sym;
CORE_ADDR addr;
const char *symname;
const char *class_name;
const char *atsign;
addr = value_as_address (type_info_ptr);
- typeinfo_sym = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol typeinfo_sym = lookup_minimal_symbol_by_pc (addr);
if (typeinfo_sym.minsym == NULL)
error (_("could not find minimal symbol for typeinfo address %s"),
paddress (gdbarch, addr));
{
CORE_ADDR real_stop_pc, method_stop_pc, func_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
- struct bound_minimal_symbol thunk_sym, fn_sym;
struct obj_section *section;
const char *thunk_name, *fn_name;
real_stop_pc = stop_pc;
/* Find the linker symbol for this potential thunk. */
- thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc);
+ bound_minimal_symbol thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc);
section = find_pc_section (real_stop_pc);
if (thunk_sym.minsym == NULL || section == NULL)
return 0;
return 0;
fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
- fn_sym = lookup_minimal_symbol (fn_name, NULL, section->objfile);
+ bound_minimal_symbol fn_sym
+ = lookup_minimal_symbol (fn_name, NULL, section->objfile);
if (fn_sym.minsym == NULL)
return 0;
}
else
{
- struct bound_minimal_symbol msymbol;
std::string arg = copy_name ($1.stoken);
- msymbol =
+ bound_minimal_symbol msymbol =
lookup_bound_minimal_symbol (arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
const char *
go_main_name (void)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
+ bound_minimal_symbol msym = lookup_minimal_symbol (GO_MAIN_MAIN, NULL, NULL);
if (msym.minsym != NULL)
return GO_MAIN_MAIN;
CORE_ADDR
hppa_symbol_address(const char *sym)
{
- struct bound_minimal_symbol minsym;
-
- minsym = lookup_minimal_symbol (sym, NULL, NULL);
+ bound_minimal_symbol minsym = lookup_minimal_symbol (sym, NULL, NULL);
if (minsym.minsym)
return minsym.value_address ();
else
{
/* Make sure address is computed correctly as a 32bit
integer even if CORE_ADDR is 64 bit wide. */
- struct bound_minimal_symbol s;
CORE_ADDR call_dest;
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
call_dest = call_dest & 0xffffffffU;
- s = lookup_minimal_symbol_by_pc (call_dest);
+ bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
&& s.minsym->linkage_name () != NULL
&& strcmp (s.minsym->linkage_name (), "__main") == 0)
/* There are also descriptors embedded in vtables. */
if (s)
{
- struct bound_minimal_symbol minsym;
-
- minsym = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol minsym = lookup_minimal_symbol_by_pc (addr);
if (minsym.minsym
&& is_vtable_name (minsym.minsym->linkage_name ()))
{
/* Try the minimal symbols. */
- struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
if (msymbol.minsym)
return msymbol.minsym->print_name ();
if (!func)
{
- struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym == nullptr)
error (_("Execution is not within a known function."));
static void
add_minsym (struct minimal_symbol *minsym, struct objfile *objfile,
struct symtab *symtab, int list_mode,
- std::vector<struct bound_minimal_symbol> *msyms)
+ std::vector<bound_minimal_symbol> *msyms)
{
if (symtab != NULL)
{
struct program_space *search_pspace,
struct symtab *symtab)
{
- std::vector<struct bound_minimal_symbol> minsyms;
+ std::vector<bound_minimal_symbol> minsyms;
if (symtab == NULL)
{
gdb_printf (_(", line %d"), sal.line);
if (!sal.symtab && !sal.line)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym)
gdb_printf (", <%s>", msym.minsym->linkage_name ());
}
static int
inferior_has_bug (const char *ver_symbol, int ver_major_min, int ver_minor_min)
{
- struct bound_minimal_symbol version_msym;
CORE_ADDR version_addr;
int got, retval = 0;
- version_msym = lookup_minimal_symbol (ver_symbol, NULL, NULL);
+ bound_minimal_symbol version_msym
+ = lookup_minimal_symbol (ver_symbol, NULL, NULL);
if (version_msym.minsym == NULL)
return 0;
/* 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. */
- struct bound_minimal_symbol mem0
+ bound_minimal_symbol mem0
= lookup_minimal_symbol ("mem0", NULL, NULL);
if (! mem0.minsym)
/* 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. */
- struct bound_minimal_symbol mem0
+ bound_minimal_symbol mem0
= lookup_minimal_symbol ("mem0", NULL, NULL);
if (! mem0.minsym)
{
const char *func_name;
char *tramp_name;
- struct bound_minimal_symbol tramp_msym;
/* Try to find a linker symbol at this address. */
- struct bound_minimal_symbol func_msym
- = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol func_msym = lookup_minimal_symbol_by_pc (addr);
if (! func_msym.minsym)
error (_("Cannot convert code address %s to function pointer:\n"
strcat (tramp_name, ".plt");
/* Try to find a linker symbol for the trampoline. */
- tramp_msym = lookup_minimal_symbol (tramp_name, NULL, NULL);
+ bound_minimal_symbol tramp_msym
+ = lookup_minimal_symbol (tramp_name, NULL, NULL);
/* We've either got another copy of the name now, or don't need
the name any more. */
{
/* See if there is a minimal symbol at that address whose name is
"NAME.plt". */
- struct bound_minimal_symbol ptr_msym = lookup_minimal_symbol_by_pc (ptr);
+ bound_minimal_symbol ptr_msym = lookup_minimal_symbol_by_pc (ptr);
if (ptr_msym.minsym)
{
if (len > 4
&& strcmp (ptr_msym_name + len - 4, ".plt") == 0)
{
- struct bound_minimal_symbol func_msym;
/* We have a .plt symbol; try to find the symbol for the
corresponding function.
char *func_name = (char *) xmalloc (len - 4 + 1);
memcpy (func_name, ptr_msym_name, len - 4);
func_name[len - 4] = '\0';
- func_msym
+ bound_minimal_symbol func_msym
= lookup_minimal_symbol (func_name, NULL, NULL);
/* If we do have such a symbol, return its value as the
= m32r_frame_unwind_cache (this_frame, this_prologue_cache);
CORE_ADDR base;
CORE_ADDR func;
- struct bound_minimal_symbol msym_stack;
struct frame_id id;
/* The FUNC is easy. */
func = get_frame_func (this_frame);
/* Check if the stack is empty. */
- msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
+ bound_minimal_symbol msym_stack
+ = lookup_minimal_symbol ("_stack", NULL, NULL);
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)
{
- struct bound_minimal_symbol msymbol;
-
- msymbol = lookup_minimal_symbol (name, NULL, NULL);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol (name, NULL, NULL);
if (msymbol.minsym)
{
reg->addr = msymbol.value_address ();
static enum insn_return_kind
m68hc11_get_return_insn (CORE_ADDR pc)
{
- struct bound_minimal_symbol sym;
-
/* A flag indicating that this is a STO_M68HC12_FAR or STO_M68HC12_INTERRUPT
function is stored by elfread.c in the high bit of the info field.
Use this to decide which instruction the function uses to return. */
- sym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (pc);
if (sym.minsym == 0)
return RETURN_RTS;
macho_resolve_oso_sym_with_minsym (struct objfile *main_objfile, asymbol *sym)
{
/* For common symbol and global symbols, use the min symtab. */
- struct bound_minimal_symbol msym;
const char *name = sym->name;
if (*name != '\0'
&& *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
++name;
- msym = lookup_minimal_symbol (name, NULL, main_objfile);
+
+ bound_minimal_symbol msym = lookup_minimal_symbol (name, NULL, main_objfile);
if (msym.minsym == NULL)
{
warning (_("can't find symbol '%s' in minsymtab"), name);
CORE_ADDR address;
struct obj_section *sect;
const char *p;
- struct bound_minimal_symbol sym;
if (arg == NULL || *arg == 0)
error (_("requires argument (address or section + address)"));
address = parse_and_eval_address (p);
+ bound_minimal_symbol sym;
if (sect)
sym = lookup_minimal_symbol_by_pc_section (address, sect);
else
and then outputs the fields for this msymbol. */
static void
-output_nondebug_symbol (ui_out *uiout,
- const struct bound_minimal_symbol &msymbol)
+output_nondebug_symbol (ui_out *uiout, const bound_minimal_symbol &msymbol)
{
struct gdbarch *gdbarch = msymbol.objfile->arch ();
ui_out_emit_tuple tuple_emitter (uiout, NULL);
Obviously, there must be distinct mangled names for each of these,
but the demangled names are all the same: S::S or S::~S. */
-struct bound_minimal_symbol
+bound_minimal_symbol
lookup_minimal_symbol (const char *name, const char *sfile,
struct objfile *objf)
{
/* See minsyms.h. */
-struct bound_minimal_symbol
+bound_minimal_symbol
lookup_bound_minimal_symbol (const char *name)
{
return lookup_minimal_symbol (name, NULL, NULL);
find_minimal_symbol_address (const char *name, CORE_ADDR *addr,
struct objfile *objfile)
{
- struct bound_minimal_symbol sym
- = lookup_minimal_symbol (name, NULL, objfile);
-
+ bound_minimal_symbol sym = lookup_minimal_symbol (name, NULL, objfile);
if (sym.minsym != NULL)
*addr = sym.value_address ();
/* See minsyms.h. */
-struct bound_minimal_symbol
+bound_minimal_symbol
lookup_minimal_symbol_linkage (const char *name, bool only_main)
{
for (objfile *objfile : current_program_space->objfiles ())
/* See minsyms.h. */
-struct bound_minimal_symbol
+bound_minimal_symbol
lookup_minimal_symbol_text (const char *name, struct objfile *objf)
{
struct minimal_symbol *msymbol;
- struct bound_minimal_symbol found_symbol;
- struct bound_minimal_symbol found_file_symbol;
+ bound_minimal_symbol found_symbol;
+ bound_minimal_symbol found_file_symbol;
unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
struct minimal_symbol *msymbol;
struct minimal_symbol *best_symbol = NULL;
struct objfile *best_objfile = NULL;
- struct bound_minimal_symbol result;
if (previous != nullptr)
{
}
}
+ bound_minimal_symbol result;
result.minsym = best_symbol;
result.objfile = best_objfile;
return result;
/* See minsyms.h. */
-struct bound_minimal_symbol
+bound_minimal_symbol
lookup_minimal_symbol_by_pc (CORE_ADDR pc)
{
return lookup_minimal_symbol_by_pc_section (pc, NULL);
/* See minsyms.h. */
CORE_ADDR
-minimal_symbol_upper_bound (struct bound_minimal_symbol minsym)
+minimal_symbol_upper_bound (bound_minimal_symbol minsym)
{
short section;
struct obj_section *obj_section;
symbols are still preferred). Returns a bound minimal symbol that
matches, or an empty bound minimal symbol if no match is found. */
-struct bound_minimal_symbol lookup_minimal_symbol (const char *,
- const char *,
- struct objfile *);
+bound_minimal_symbol lookup_minimal_symbol (const char *, const char *,
+ struct objfile *);
/* Like lookup_minimal_symbol, but searches all files and
objfiles. */
-struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
+bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
/* Look through all the current minimal symbol tables and find the
first minimal symbol that matches NAME and has text type. If OBJF
This function only searches the mangled (linkage) names. */
-struct bound_minimal_symbol lookup_minimal_symbol_text (const char *,
- struct objfile *);
+bound_minimal_symbol lookup_minimal_symbol_text (const char *,
+ struct objfile *);
/* Look through the minimal symbols in OBJF (and its separate debug
objfiles) for a global (not file-local) minsym whose linkage name
objfile is not accepted. Returns a bound minimal symbol that
matches, or an "empty" bound minimal symbol otherwise. */
-extern struct bound_minimal_symbol lookup_minimal_symbol_linkage
- (const char *name, struct objfile *objf)
+extern bound_minimal_symbol lookup_minimal_symbol_linkage (const char *name,
+ struct objfile *objf)
ATTRIBUTE_NONNULL (1) ATTRIBUTE_NONNULL (2);
/* A variant of lookup_minimal_symbol_linkage that iterates over all
objfiles. If ONLY_MAIN is true, then only an objfile with
OBJF_MAINLINE will be considered. */
-extern struct bound_minimal_symbol lookup_minimal_symbol_linkage
- (const char *name, bool only_main)
+extern bound_minimal_symbol lookup_minimal_symbol_linkage (const char *name,
+ bool only_main)
ATTRIBUTE_NONNULL (1);
/* Look through all the current minimal symbol tables and find the
then the contents will be set to reference the closest symbol before
PC_IN. */
-struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section
+bound_minimal_symbol lookup_minimal_symbol_by_pc_section
(CORE_ADDR pc_in,
struct obj_section *section,
lookup_msym_prefer prefer = lookup_msym_prefer::TEXT,
This is a wrapper that calls lookup_minimal_symbol_by_pc_section
with a NULL section argument. */
-struct bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR);
+bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR);
/* Iterate over all the minimal symbols in the objfile OBJF which
match NAME. Both the ordinary and demangled names of each symbol
symbol in the same section, or the end of the section, as the end
of the function. */
-CORE_ADDR minimal_symbol_upper_bound (struct bound_minimal_symbol minsym);
+CORE_ADDR minimal_symbol_upper_bound (bound_minimal_symbol minsym);
/* Return the type of MSYMBOL, a minimal symbol of OBJFILE. If
ADDRESS_P is not NULL, set it to the MSYMBOL's resolved
static CORE_ADDR
mips_fbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol msym
- = lookup_bound_minimal_symbol ("_mips_rtld_bind");
+ bound_minimal_symbol msym = lookup_bound_minimal_symbol ("_mips_rtld_bind");
if (msym.minsym != nullptr && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
static CORE_ADDR
mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol resolver;
-
- resolver = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
+ bound_minimal_symbol resolver
+ = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
if (resolver.minsym && resolver.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
/* We are in symbol reading so it is OK to cast away constness. */
struct block *block = (struct block *) sym->value_block ();
CORE_ADDR compact_block_start;
- struct bound_minimal_symbol msym;
compact_block_start = block->start () | 1;
- msym = lookup_minimal_symbol_by_pc (compact_block_start);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol_by_pc (compact_block_start);
if (msym.minsym && !msymbol_is_mips (msym.minsym))
{
block->set_start (compact_block_start);
int
mips_pc_is_mips (CORE_ADDR memaddr)
{
- struct bound_minimal_symbol sym;
-
/* Flags indicating that this is a MIPS16 or microMIPS function is
stored by elfread.c in the high bit of the info field. Use this
to decide if the function is standard MIPS. Otherwise if bit 0
of the address is clear, then this is a standard MIPS function. */
- sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
if (sym.minsym)
return msymbol_is_mips (sym.minsym);
else
int
mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct bound_minimal_symbol sym;
-
/* A flag indicating that this is a MIPS16 function is stored by
elfread.c in the high bit of the info field. Use this to decide
if the function is MIPS16. Otherwise if bit 0 of the address is
set, then ELF file flags will tell if this is a MIPS16 function. */
- sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
if (sym.minsym)
return msymbol_is_mips16 (sym.minsym);
else
int
mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct bound_minimal_symbol sym;
-
/* A flag indicating that this is a microMIPS function is stored by
elfread.c in the high bit of the info field. Use this to decide
if the function is microMIPS. Otherwise if bit 0 of the address
is set, then ELF file flags will tell if this is a microMIPS
function. */
- sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
if (sym.minsym)
return msymbol_is_micromips (sym.minsym);
else
static enum mips_isa
mips_pc_isa (struct gdbarch *gdbarch, CORE_ADDR memaddr)
{
- struct bound_minimal_symbol sym;
-
/* A flag indicating that this is a MIPS16 or a microMIPS function
is stored by elfread.c in the high bit of the info field. Use
this to decide if the function is MIPS16 or microMIPS or normal
MIPS. Otherwise if bit 0 of the address is set, then ELF file
flags will tell if this is a MIPS16 or a microMIPS function. */
- sym = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol_by_pc (make_compact_addr (memaddr));
if (sym.minsym)
{
if (msymbol_is_micromips (sym.minsym))
{
gdb_byte dummy[4];
CORE_ADDR pc = get_frame_address_in_block (this_frame);
- struct bound_minimal_symbol msym;
/* Use the stub unwinder for unreadable code. */
if (target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0)
/* Calling a PIC function from a non-PIC function passes through a
stub. The stub for foo is named ".pic.foo". */
- msym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym != NULL
&& msym.minsym->linkage_name () != NULL
&& startswith (msym.minsym->linkage_name (), ".pic."))
{
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct bound_minimal_symbol msym;
int i;
gdb_byte stub_code[16];
int32_t stub_words[4];
/* The stub for foo is named ".pic.foo", and is either two
instructions inserted before foo or a three instruction sequence
which jumps to foo. */
- msym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym == NULL
|| msym.value_address () != pc
|| msym.minsym->linkage_name () == NULL
static CORE_ADDR
msp430_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
{
- struct bound_minimal_symbol bms;
const char *stub_name;
struct gdbarch *gdbarch = get_frame_arch (frame);
- bms = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol bms = lookup_minimal_symbol_by_pc (pc);
if (!bms.minsym)
return pc;
static CORE_ADDR
nbsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol ("_rtld_bind_start", NULL, NULL);
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
symbol_names->push_back (sym->natural_name ());
else
{
- struct bound_minimal_symbol msym
- = lookup_minimal_symbol (selector, 0, 0);
+ bound_minimal_symbol msym = lookup_minimal_symbol (selector, 0, 0);
if (msym.minsym != NULL)
symbol_names->push_back (msym.minsym->natural_name ());
for (i = 0; i < nmethcalls; i++)
{
- struct bound_minimal_symbol func;
-
/* Try both with and without underscore. */
- func = lookup_bound_minimal_symbol (methcalls[i].name);
+ bound_minimal_symbol func
+ = lookup_bound_minimal_symbol (methcalls[i].name);
if ((func.minsym == NULL) && (methcalls[i].name[0] == '_'))
{
func = lookup_bound_minimal_symbol (methcalls[i].name + 1);
domain_search_flags domain);
/* See quick_symbol_functions. */
- struct compunit_symtab *find_pc_sect_compunit_symtab
- (struct bound_minimal_symbol msymbol,
- CORE_ADDR pc,
- struct obj_section *section,
- int warn_if_readin);
+ struct compunit_symtab *
+ find_pc_sect_compunit_symtab (bound_minimal_symbol msymbol, CORE_ADDR pc,
+ struct obj_section *section,
+ int warn_if_readin);
/* See quick_symbol_functions. */
void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
CORE_ADDR
obsd_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol("_dl_bind", NULL, NULL);
+ bound_minimal_symbol msym = lookup_minimal_symbol ("_dl_bind", NULL, NULL);
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
}
else
{
- struct bound_minimal_symbol msymbol;
std::string arg = copy_name ($1.stoken);
- msymbol =
- lookup_bound_minimal_symbol (arg.c_str ());
+ bound_minimal_symbol msymbol
+ = lookup_bound_minimal_symbol (arg.c_str ());
if (msymbol.minsym != NULL)
pstate->push_new<var_msym_value_operation>
(msymbol);
const char *
pascal_main_name (void)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (GPC_P_INITIALIZE, NULL, NULL);
/* If '_p_initialize' was not found, the main program is likely not
written in Pascal. */
{
/* Print vtbl's nicely. */
CORE_ADDR vt_address = unpack_pointer (type, valaddr);
- struct bound_minimal_symbol msymbol =
- lookup_minimal_symbol_by_pc (vt_address);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol_by_pc (vt_address);
/* If 'symbol_print' is set, we did the work above. */
if (!options->symbol_print
}
else
{
- struct bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
+ bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
if (msymbol.minsym != NULL)
push_new<expr::var_msym_value_operation> (msymbol);
else if (!have_full_symbols (current_program_space)
parser_state::push_dollar (struct stoken str)
{
struct block_symbol sym;
- struct bound_minimal_symbol msym;
struct internalvar *isym = NULL;
std::string copy;
push_new<expr::var_value_operation> (sym);
return;
}
- msym = lookup_bound_minimal_symbol (copy.c_str ());
+ bound_minimal_symbol msym = lookup_bound_minimal_symbol (copy.c_str ());
if (msym.minsym)
{
push_new<expr::var_msym_value_operation> (msym);
static int
powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
{
- struct bound_minimal_symbol sym;
-
/* Check whether PC is in the dynamic linker. This also checks
whether it is in the .plt section, used by non-PIC executables. */
if (svr4_in_dynsym_resolve_code (pc))
return 1;
/* Check if we are in the resolver. */
- sym = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol sym = lookup_minimal_symbol_by_pc (pc);
if (sym.minsym != NULL
&& (strcmp (sym.minsym->linkage_name (), "__glink") == 0
|| strcmp (sym.minsym->linkage_name (), "__glink_PLTresolve") == 0))
static CORE_ADDR
ppc_elfv2_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol fun;
int local_entry_offset = 0;
- fun = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol fun = lookup_minimal_symbol_by_pc (pc);
if (fun.minsym == NULL)
return pc;
convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
{
struct obj_section *dot_fn_section;
- struct bound_minimal_symbol dot_fn;
- struct bound_minimal_symbol fn;
/* Find the minimal symbol that corresponds to CODE_ADDR (should
have a name of the form ".FN"). */
- dot_fn = lookup_minimal_symbol_by_pc (code_addr);
+ bound_minimal_symbol dot_fn = lookup_minimal_symbol_by_pc (code_addr);
if (dot_fn.minsym == NULL || dot_fn.minsym->linkage_name ()[0] != '.')
return 0;
/* Get the section that contains CODE_ADDR. Need this for the
address. Only look for the minimal symbol in ".FN"'s object file
- avoids problems when two object files (i.e., shared libraries)
contain a minimal symbol with the same name. */
- fn = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1, NULL,
- dot_fn_section->objfile);
+ bound_minimal_symbol fn
+ = lookup_minimal_symbol (dot_fn.minsym->linkage_name () + 1, NULL,
+ dot_fn_section->objfile);
if (fn.minsym == NULL)
return 0;
/* Found a descriptor. */
int *line, /* OUT */
int *unmapped) /* OUT */
{
- struct bound_minimal_symbol msymbol;
struct symbol *symbol;
CORE_ADDR name_location = 0;
struct obj_section *section = NULL;
save some memory, but for many debug format--ELF/DWARF or
anything/stabs--it would be inconvenient to eliminate those minimal
symbols anyway). */
- msymbol = lookup_minimal_symbol_by_pc_section (addr, section);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol_by_pc_section (addr, section);
symbol = find_pc_sect_function (addr, section);
if (symbol)
struct gdbarch *gdbarch;
int regno;
struct symbol *sym;
- struct bound_minimal_symbol msymbol;
long val;
struct obj_section *section;
CORE_ADDR load_addr, context_pc = 0;
return;
}
- msymbol = lookup_bound_minimal_symbol (exp);
+ bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (exp);
if (msymbol.minsym != NULL)
{
case LOC_UNRESOLVED:
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_bound_minimal_symbol (sym->linkage_name ());
+ bound_minimal_symbol msym
+ = lookup_bound_minimal_symbol (sym->linkage_name ());
if (msym.minsym == NULL)
gdb_printf ("unresolved");
else
find_pc_sect_psymtab_closer (struct objfile *objfile,
CORE_ADDR pc, struct obj_section *section,
struct partial_symtab *pst,
- struct bound_minimal_symbol msymbol)
+ bound_minimal_symbol msymbol)
{
struct partial_symtab *tpst;
struct partial_symtab *best_pst = pst;
psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
CORE_ADDR pc,
struct obj_section *section,
- struct bound_minimal_symbol msymbol)
+ bound_minimal_symbol msymbol)
{
for (partial_symtab *pst : partial_symbols (objfile))
if (pc >= pst->text_low (objfile) && pc < pst->text_high (objfile))
the definition of quick_symbol_functions in symfile.h. */
struct compunit_symtab *
-psymbol_functions::find_pc_sect_compunit_symtab
- (struct objfile *objfile,
- struct bound_minimal_symbol msymbol,
- CORE_ADDR pc,
- struct obj_section *section,
- int warn_if_readin)
+psymbol_functions::find_pc_sect_compunit_symtab (struct objfile *objfile,
+ bound_minimal_symbol msymbol,
+ CORE_ADDR pc,
+ struct obj_section *section,
+ int warn_if_readin)
{
struct partial_symtab *ps = find_pc_sect_psymtab (objfile,
pc, section,
if (address_arg != NULL)
{
- struct bound_minimal_symbol msymbol;
+ bound_minimal_symbol msymbol;
/* We don't assume each pc has a unique objfile (this is for
debugging). */
domain_search_flags kind) override;
struct compunit_symtab *find_pc_sect_compunit_symtab
- (struct objfile *objfile, struct bound_minimal_symbol msymbol,
- CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override;
+ (struct objfile *objfile, bound_minimal_symbol msymbol, CORE_ADDR pc,
+ struct obj_section *section, int warn_if_readin) override;
struct compunit_symtab *find_compunit_symtab_by_address
(struct objfile *objfile, CORE_ADDR address) override
exactly matches PC, or, if we cannot find an exact match, the
psymtab that contains a symbol whose address is closest to PC. */
- struct partial_symtab *find_pc_sect_psymtab
- (struct objfile *objfile,
- CORE_ADDR pc,
- struct obj_section *section,
- struct bound_minimal_symbol msymbol);
+ struct partial_symtab *find_pc_sect_psymtab (struct objfile *objfile,
+ CORE_ADDR pc,
+ struct obj_section *section,
+ bound_minimal_symbol msymbol);
private:
else if (PyLong_Check (py_func.get ()))
{
CORE_ADDR addr;
- struct bound_minimal_symbol msymbol;
if (get_addr_from_python (py_func.get (), &addr) < 0)
return EXT_LANG_BT_ERROR;
- msymbol = lookup_minimal_symbol_by_pc (addr);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol_by_pc (addr);
if (msymbol.minsym != NULL)
function = msymbol.minsym->print_name ();
}
compunit that contains a symbol whose address is closest to
PC. */
virtual struct compunit_symtab *find_pc_sect_compunit_symtab
- (struct objfile *objfile, struct bound_minimal_symbol msymbol,
- CORE_ADDR pc, struct obj_section *section, int warn_if_readin) = 0;
+ (struct objfile *objfile, bound_minimal_symbol msymbol, CORE_ADDR pc,
+ struct obj_section *section, int warn_if_readin) = 0;
/* Return the comp unit from OBJFILE that contains a symbol at
ADDRESS. Return NULL if there is no such comp unit. Unlike
and return its associated minimal symbol.
Return NULL if not found. */
-static struct bound_minimal_symbol
+static bound_minimal_symbol
get_running_thread_msymbol ()
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol (running_thread_name, NULL, NULL);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (running_thread_name, NULL, NULL);
if (!msym.minsym)
/* Older versions of the GNAT runtime were using a different
(less ideal) name for the symbol where the active thread ID
static bool
has_ravenscar_runtime ()
{
- struct bound_minimal_symbol msym_ravenscar_runtime_initializer
+ bound_minimal_symbol msym_ravenscar_runtime_initializer
= lookup_minimal_symbol (ravenscar_runtime_initializer, NULL, NULL);
- struct bound_minimal_symbol msym_known_tasks
+ bound_minimal_symbol msym_known_tasks
= lookup_minimal_symbol (known_tasks_name, NULL, NULL);
- struct bound_minimal_symbol msym_first_task
+ bound_minimal_symbol msym_first_task
= lookup_minimal_symbol (first_task_name, NULL, NULL);
- struct bound_minimal_symbol msym_running_thread
- = get_running_thread_msymbol ();
+ bound_minimal_symbol msym_running_thread = get_running_thread_msymbol ();
return (msym_ravenscar_runtime_initializer.minsym
&& (msym_known_tasks.minsym || msym_first_task.minsym)
static CORE_ADDR
get_running_thread_id (int cpu)
{
- struct bound_minimal_symbol object_msym = get_running_thread_msymbol ();
+ bound_minimal_symbol object_msym = get_running_thread_msymbol ();
int object_size;
int buf_size;
gdb_byte *buf;
while (startswith (reply.data (), "qSymbol:"))
{
- struct bound_minimal_symbol sym;
-
tmp = &reply[8];
end = hex2bin (tmp, reinterpret_cast <gdb_byte *> (msg.data ()),
strlen (tmp) / 2);
msg[end] = '\0';
- sym = lookup_minimal_symbol (msg.data (), NULL, NULL);
+ bound_minimal_symbol sym
+ = lookup_minimal_symbol (msg.data (), NULL, NULL);
if (sym.minsym == NULL)
xsnprintf (msg.data (), get_remote_packet_size (), "qSymbol::%s",
&reply[8]);
{
CORE_ADDR displ = op & BL_DISPLACEMENT_MASK;
CORE_ADDR call_dest = pc + 4 + displ;
- struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
+ bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
/* We check for ___eabi (three leading underscores) in addition
to __eabi in case the GCC option "-fleading-underscore" was
unsigned int ii, op;
int rel;
CORE_ADDR solib_target_pc;
- struct bound_minimal_symbol msymbol;
static unsigned trampoline_code[] =
{
};
/* Check for bigtoc fixup code. */
- msymbol = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym
&& rs6000_in_solib_return_trampoline (gdbarch, pc,
msymbol.minsym->linkage_name ()))
ps_pglobal_lookup (struct ps_prochandle *ph, const char *ld_object_name,
const char *ld_symbol_name, psaddr_t *ld_symbol_addr)
{
- struct bound_minimal_symbol ms;
-
- ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
+ bound_minimal_symbol ms = lookup_minimal_symbol (ld_symbol_name, NULL, NULL);
if (!ms.minsym)
return PS_NOSYM;
/* Print thr_create start function. */
if (ti.ti_startfunc != 0)
{
- const struct bound_minimal_symbol msym
+ const bound_minimal_symbol msym
= lookup_minimal_symbol_by_pc (ti.ti_startfunc);
gdb_printf (" startfunc=%s",
/* If thread is asleep, print function that went to sleep. */
if (ti.ti_state == TD_THR_SLEEP)
{
- const struct bound_minimal_symbol msym
+ const bound_minimal_symbol msym
= lookup_minimal_symbol_by_pc (ti.ti_pc);
gdb_printf (" sleepfunc=%s",
static CORE_ADDR
sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- struct bound_minimal_symbol msym;
-
- msym = lookup_minimal_symbol("elf_bndr", NULL, NULL);
+ bound_minimal_symbol msym = lookup_minimal_symbol ("elf_bndr", NULL, NULL);
if (msym.minsym && msym.value_address () == pc)
return frame_unwind_caller_pc (get_current_frame ());
lm_base (void)
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
- struct bound_minimal_symbol got_sym;
CORE_ADDR addr;
gdb_byte buf[TIC6X_PTR_SIZE];
dsbt_info *info = get_dsbt_info (current_program_space);
if (info->lm_base_cache)
return info->lm_base_cache;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
- current_program_space->symfile_object_file);
+ bound_minimal_symbol got_sym
+ = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+ current_program_space->symfile_object_file);
if (got_sym.minsym != 0)
{
lm_base (void)
{
bfd_endian byte_order = gdbarch_byte_order (current_inferior ()->arch ());
- struct bound_minimal_symbol got_sym;
CORE_ADDR addr;
gdb_byte buf[FRV_PTR_SIZE];
if (lm_base_cache)
return lm_base_cache;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
- current_program_space->symfile_object_file);
+ bound_minimal_symbol got_sym
+ = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL,
+ current_program_space->symfile_object_file);
if (got_sym.minsym == 0)
{
solib_debug_printf ("_GLOBAL_OFFSET_TABLE_ not found.");
static CORE_ADDR
main_got (void)
{
- struct bound_minimal_symbol got_sym;
-
objfile *objf = current_program_space->symfile_object_file;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
+ bound_minimal_symbol got_sym
+ = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, objf);
if (got_sym.minsym == 0)
return 0;
static CORE_ADDR
elf_locate_base (void)
{
- struct bound_minimal_symbol msymbol;
CORE_ADDR dyn_ptr, dyn_ptr_addr;
if (!svr4_have_link_map_offsets ())
/* This may be a static executable. Look for the symbol
conventionally named _r_debug, as a last resort. */
- msymbol = lookup_minimal_symbol ("_r_debug", NULL,
- current_program_space->symfile_object_file);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol ("_r_debug", NULL,
+ current_program_space->symfile_object_file);
if (msymbol.minsym != NULL)
return msymbol.value_address ();
static int
enable_break (struct svr4_info *info, int from_tty)
{
- struct bound_minimal_symbol msymbol;
const char * const *bkpt_namep;
asection *interp_sect;
CORE_ADDR sym_addr;
objfile *objf = current_program_space->symfile_object_file;
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
- msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{
{
for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
{
- msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (*bkpt_namep, NULL, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{
}
else
{
- struct bound_minimal_symbol msymbol;
CORE_ADDR pc;
if (!get_frame_address_in_block_if_available (frame, &pc))
return funname;
- msymbol = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym != NULL)
{
funname.reset (xstrdup (msymbol.minsym->print_name ()));
}
else if (frame_pc_p)
{
- struct bound_minimal_symbol msymbol;
-
- msymbol = lookup_minimal_symbol_by_pc (frame_pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (frame_pc);
if (msymbol.minsym != NULL)
{
funname = msymbol.minsym->print_name ();
}
struct compunit_symtab *
-objfile::find_pc_sect_compunit_symtab (struct bound_minimal_symbol msymbol,
+objfile::find_pc_sect_compunit_symtab (bound_minimal_symbol msymbol,
CORE_ADDR pc,
struct obj_section *section,
int warn_if_readin)
static int
simple_read_overlay_table (void)
{
- struct bound_minimal_symbol novlys_msym;
- struct bound_minimal_symbol ovly_table_msym;
struct gdbarch *gdbarch;
int word_size;
enum bfd_endian byte_order;
simple_free_overlay_table ();
- novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL);
+ bound_minimal_symbol novlys_msym
+ = lookup_minimal_symbol ("_novlys", NULL, NULL);
if (! novlys_msym.minsym)
{
error (_("Error reading inferior's overlay table: "
return 0;
}
- ovly_table_msym = lookup_bound_minimal_symbol ("_ovly_table");
+ bound_minimal_symbol ovly_table_msym
+ = lookup_bound_minimal_symbol ("_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? */
- struct bound_minimal_symbol minsym
+ bound_minimal_symbol minsym
= lookup_minimal_symbol ("_ovly_table", NULL, NULL);
if (minsym.minsym == NULL)
{
struct compunit_symtab *best_cust = NULL;
CORE_ADDR best_cust_range = 0;
- struct bound_minimal_symbol msymbol;
/* If we know that this is not a text address, return failure. This is
necessary because we loop based on the block's high and low code
addresses, which do not include the data ranges, and because
we call find_pc_sect_psymtab which has a similar restriction based
on the partial_symtab's texthigh and textlow. */
- msymbol = lookup_minimal_symbol_by_pc_section (pc, section);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol_by_pc_section (pc, section);
if (msymbol.minsym && msymbol.minsym->data_p ())
return NULL;
int len;
const linetable_entry *item;
const struct blockvector *bv;
- struct bound_minimal_symbol msymbol;
/* Info on best line seen so far, and where it starts, and its file. */
* check for the address being the same, to avoid an
* infinite recursion.
*/
- msymbol = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym != NULL)
if (msymbol.minsym->type () == mst_solib_trampoline)
{
- struct bound_minimal_symbol mfunsym
- = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (),
- NULL);
+ bound_minimal_symbol mfunsym
+ = lookup_minimal_symbol_text (msymbol.minsym->linkage_name (), NULL);
if (mfunsym.minsym == NULL)
/* I eliminated this warning since it is coming out
}
else
{
- struct bound_minimal_symbol msymbol
+ bound_minimal_symbol msymbol
= lookup_minimal_symbol_by_pc_section (sal->pc, sal->section);
if (msymbol.minsym == NULL)
for non-debugging symbols to gdb_stdout. */
static void
-print_msymbol_info (struct bound_minimal_symbol msymbol)
+print_msymbol_info (bound_minimal_symbol msymbol)
{
struct gdbarch *gdbarch = msymbol.objfile->arch ();
const char *tmp;
/* If msymbol is non-null, then a match was made on something for
which only minimal_symbols exist. */
- struct bound_minimal_symbol msymbol;
+ bound_minimal_symbol msymbol;
private:
static void
info_scope_command (const char *args_in, int from_tty)
{
- struct bound_minimal_symbol msym;
const struct block *block;
const char *symname;
const char *save_args = args_in;
sym->value_block ()->entry_pc ()));
break;
case LOC_UNRESOLVED:
- msym = lookup_minimal_symbol (sym->linkage_name (),
- NULL, NULL);
- if (msym.minsym == NULL)
- gdb_printf ("Unresolved Static");
- else
- {
- gdb_printf ("static storage at address ");
- gdb_printf ("%s",
- paddress (gdbarch, msym.value_address ()));
- }
- break;
+ {
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (sym->linkage_name (), NULL,
+ NULL);
+ if (msym.minsym == NULL)
+ gdb_printf ("Unresolved Static");
+ else
+ {
+ gdb_printf ("static storage at address ");
+ gdb_printf ("%s",
+ paddress (gdbarch, msym.value_address ()));
+ }
+ break;
+ }
case LOC_OPTIMIZED_OUT:
gdb_printf ("optimized out.\n");
continue;
static CORE_ADDR
tui_find_backward_disassembly_start_address (CORE_ADDR addr)
{
- struct bound_minimal_symbol msym, msym_prev;
-
- msym = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr,
- lookup_msym_prefer::TEXT,
- &msym_prev);
+ bound_minimal_symbol msym_prev;
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol_by_pc_section (addr - 1, nullptr,
+ lookup_msym_prefer::TEXT,
+ &msym_prev);
if (msym.minsym != nullptr)
return msym.value_address ();
else if (msym_prev.minsym != nullptr)
if (addr == 0)
{
- struct bound_minimal_symbol main_symbol
+ bound_minimal_symbol main_symbol
= lookup_minimal_symbol (main_name (), nullptr, nullptr);
if (main_symbol.minsym != nullptr)
addr = main_symbol.value_address ();
}
else
{
- struct bound_minimal_symbol msymbol =
- lookup_bound_minimal_symbol (name);
+ bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
if (msymbol.minsym != NULL)
{
{
/* With some compilers, e.g. HP aCC, static data members are
reported as non-debuggable symbols. */
- struct bound_minimal_symbol msym
+ bound_minimal_symbol msym
= lookup_minimal_symbol (phys_name, NULL, NULL);
struct type *field_type = type->field (fieldno).type ();
struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
const char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
struct symbol *sym;
- struct bound_minimal_symbol msym;
+ bound_minimal_symbol msym;
sym = lookup_symbol (physname, nullptr, SEARCH_FUNCTION_DOMAIN,
nullptr).symbol;
x86_in_indirect_branch_thunk (CORE_ADDR pc, const char * const *register_names,
int lo, int hi)
{
- struct bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
+ bound_minimal_symbol bmfun = lookup_minimal_symbol_by_pc (pc);
if (bmfun.minsym == nullptr)
return false;
/* stage2: check for FP saving scheme */
if (prologue[pos] == 0xcd) /* call nn */
{
- struct bound_minimal_symbol msymbol;
- msymbol = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol ("__sdcc_enter_ix", NULL, NULL);
if (msymbol.minsym)
{
value = msymbol.value_address ();
break; /* found */
for (i = sizeof(names)/sizeof(*names)-1; i >= 0; --i)
{
- struct bound_minimal_symbol msymbol;
- msymbol = lookup_minimal_symbol (names[i], NULL, NULL);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (names[i], NULL, NULL);
if (!msymbol.minsym)
continue;
if (addr == msymbol.value_address ())
static int addr = -1;
if (addr == -1)
{
- struct bound_minimal_symbol bh;
- bh = lookup_minimal_symbol ("_break_handler", NULL, NULL);
+ bound_minimal_symbol bh
+ = lookup_minimal_symbol ("_break_handler", NULL, NULL);
if (bh.minsym)
addr = bh.value_address ();
else
static int
z80_read_overlay_region_table ()
{
- struct bound_minimal_symbol novly_regions_msym;
- struct bound_minimal_symbol ovly_region_table_msym;
struct gdbarch *gdbarch;
int word_size;
enum bfd_endian byte_order;
z80_free_overlay_region_table ();
- novly_regions_msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
+ bound_minimal_symbol novly_regions_msym
+ = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
if (! novly_regions_msym.minsym)
{
error (_("Error reading inferior's overlay table: "
return 0;
}
- ovly_region_table_msym = lookup_bound_minimal_symbol ("_ovly_region_table");
+ bound_minimal_symbol ovly_region_table_msym
+ = lookup_bound_minimal_symbol ("_ovly_region_table");
if (! ovly_region_table_msym.minsym)
{
error (_("Error reading inferior's overlay table: couldn't find "