mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
gdb: drop struct keyword when using bound_minimal_symbol
This is a simple find / replace from "struct bound_minimal_symbol" to "bound_minimal_symbol", to make things shorter and more consisten througout. In some cases, move variable declarations where first used. Change-Id: Ica4af11c4ac528aa842bfa49a7afe8fe77a66849 Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
committed by
Simon Marchi
parent
10ac7e80c0
commit
03b40f6f55
@@ -1831,7 +1831,7 @@ write_var_or_type (struct parser_state *par_state,
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -798,7 +798,6 @@ ada_get_decoded_type (struct type *type)
|
||||
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
|
||||
@@ -806,7 +805,8 @@ ada_main_name ()
|
||||
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)
|
||||
{
|
||||
@@ -4921,10 +4921,10 @@ add_defn_to_vec (std::vector<struct block_symbol> &result,
|
||||
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);
|
||||
@@ -11695,7 +11695,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
|
||||
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)
|
||||
@@ -11715,7 +11715,7 @@ ada_has_this_exception_support (const struct exception_support_info *einfo)
|
||||
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)
|
||||
|
||||
@@ -239,8 +239,7 @@ extern struct block_symbol ada_lookup_symbol (const char *,
|
||||
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 *);
|
||||
|
||||
|
||||
@@ -712,9 +712,7 @@ read_atcb (CORE_ADDR task_id, struct ada_task_info *task_info)
|
||||
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 ();
|
||||
@@ -914,7 +912,6 @@ read_known_tasks_list (struct ada_tasks_inferior_data *data)
|
||||
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. */
|
||||
@@ -923,7 +920,8 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
|
||||
|
||||
/* 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;
|
||||
|
||||
@@ -376,7 +376,6 @@ pid_to_prc (ptid_t *ptidp)
|
||||
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;
|
||||
|
||||
@@ -396,7 +395,7 @@ pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int co
|
||||
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)
|
||||
@@ -956,7 +955,6 @@ pd_enable (inferior *inf)
|
||||
{
|
||||
int status;
|
||||
char *stub_name;
|
||||
struct bound_minimal_symbol ms;
|
||||
struct aix_thread_variables *data;
|
||||
|
||||
if (inf == NULL)
|
||||
@@ -980,7 +978,7 @@ pd_enable (inferior *inf)
|
||||
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 ();
|
||||
|
||||
@@ -435,11 +435,10 @@ amd64_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
|
||||
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)
|
||||
|
||||
@@ -506,7 +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. */
|
||||
struct bound_minimal_symbol resolver
|
||||
bound_minimal_symbol resolver
|
||||
= lookup_minimal_symbol ("_dl_linux_resolver", NULL, NULL);
|
||||
|
||||
if (arc_debug)
|
||||
|
||||
@@ -712,7 +712,6 @@ arm_find_mapping_symbol (CORE_ADDR memaddr, CORE_ADDR *start)
|
||||
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);
|
||||
@@ -752,7 +751,7 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||
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));
|
||||
|
||||
@@ -913,9 +912,8 @@ static int
|
||||
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)
|
||||
@@ -1684,7 +1682,6 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
|
||||
{
|
||||
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;
|
||||
@@ -1695,7 +1692,7 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
|
||||
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
|
||||
@@ -9391,9 +9388,8 @@ 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);
|
||||
|
||||
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 ();
|
||||
|
||||
@@ -9467,7 +9463,6 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
{
|
||||
char *target_name;
|
||||
int target_len = namelen - 2;
|
||||
struct bound_minimal_symbol minsym;
|
||||
struct objfile *objfile;
|
||||
struct obj_section *sec;
|
||||
|
||||
@@ -9482,7 +9477,8 @@ arm_skip_stub (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
|
||||
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
|
||||
|
||||
@@ -40,7 +40,6 @@ arm_pe_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
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;
|
||||
|
||||
@@ -61,7 +60,7 @@ arm_pe_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR 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;
|
||||
|
||||
@@ -100,7 +99,7 @@ arm_wince_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
|
||||
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
|
||||
|
||||
@@ -81,7 +81,6 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
|
||||
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;
|
||||
@@ -91,7 +90,7 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
|
||||
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;
|
||||
|
||||
|
||||
@@ -530,7 +530,6 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||
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;
|
||||
@@ -623,7 +622,8 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||
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;
|
||||
|
||||
|
||||
@@ -598,9 +598,8 @@ gen_var_ref (struct agent_expr *ax, struct axs_value *value, struct symbol *var)
|
||||
|
||||
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 ());
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
|
||||
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. */
|
||||
|
||||
@@ -85,7 +85,6 @@ CORE_ADDR
|
||||
get_pc_function_start (CORE_ADDR pc)
|
||||
{
|
||||
const struct block *bl;
|
||||
struct bound_minimal_symbol msymbol;
|
||||
|
||||
bl = block_for_pc (pc);
|
||||
if (bl)
|
||||
@@ -99,7 +98,7 @@ get_pc_function_start (CORE_ADDR pc)
|
||||
}
|
||||
}
|
||||
|
||||
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 ();
|
||||
@@ -216,9 +215,9 @@ find_pc_partial_function_sym (CORE_ADDR pc,
|
||||
{
|
||||
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
|
||||
|
||||
@@ -3466,7 +3466,7 @@ create_internal_breakpoint (struct gdbarch *gdbarch,
|
||||
|
||||
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;
|
||||
|
||||
@@ -3498,10 +3498,10 @@ static const char *const longjmp_names[] =
|
||||
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;
|
||||
@@ -3511,10 +3511,10 @@ struct breakpoint_objfile_data
|
||||
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;
|
||||
@@ -3570,9 +3570,8 @@ create_overlay_event_breakpoint (void)
|
||||
|
||||
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. */
|
||||
@@ -3675,9 +3674,8 @@ create_longjmp_master_breakpoint_names (objfile *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. */
|
||||
@@ -3753,9 +3751,8 @@ create_std_terminate_master_breakpoint (void)
|
||||
|
||||
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))
|
||||
{
|
||||
@@ -3846,9 +3843,8 @@ create_exception_master_breakpoint_hook (objfile *objfile)
|
||||
|
||||
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;
|
||||
|
||||
@@ -157,9 +157,7 @@ static int bsd_uthread_active;
|
||||
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 ();
|
||||
|
||||
|
||||
@@ -547,7 +547,6 @@ ftrace_new_gap (struct btrace_thread_info *btinfo, int errcode,
|
||||
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;
|
||||
@@ -556,7 +555,7 @@ ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
|
||||
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)
|
||||
|
||||
@@ -176,8 +176,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
|
||||
{
|
||||
/* 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
|
||||
|
||||
@@ -174,7 +174,6 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
|
||||
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;
|
||||
@@ -183,8 +182,8 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
|
||||
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;
|
||||
|
||||
@@ -574,12 +574,12 @@ coff_read_minsyms (file_ptr symtab_offset, unsigned int nsyms,
|
||||
{
|
||||
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"
|
||||
|
||||
@@ -259,8 +259,7 @@ convert_symbol_sym (compile_c_instance *context, const char *identifier,
|
||||
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;
|
||||
@@ -356,9 +355,8 @@ gcc_convert_symbol (void *datum,
|
||||
}
|
||||
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);
|
||||
@@ -413,9 +411,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -275,7 +275,7 @@ convert_symbol_sym (compile_cplus_instance *instance,
|
||||
|
||||
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;
|
||||
@@ -453,9 +453,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -604,7 +604,6 @@ compile_object_load (const compile_file_names &file_names,
|
||||
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;
|
||||
@@ -765,7 +764,8 @@ compile_object_load (const compile_file_names &file_names,
|
||||
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 ())
|
||||
{
|
||||
|
||||
@@ -2097,7 +2097,7 @@ csky_frame_unwind_cache (const frame_info_ptr &this_frame)
|
||||
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 ();
|
||||
|
||||
@@ -323,9 +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)
|
||||
{
|
||||
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 ());
|
||||
|
||||
@@ -435,7 +435,7 @@ PrimaryExpression:
|
||||
'(' 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;
|
||||
@@ -463,7 +463,8 @@ PrimaryExpression:
|
||||
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)
|
||||
|
||||
@@ -38,9 +38,7 @@ static const char D_MAIN[] = "D main";
|
||||
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;
|
||||
|
||||
|
||||
@@ -891,11 +891,10 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
||||
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, ':');
|
||||
@@ -908,7 +907,7 @@ find_stab_function (const char *namestring, const char *filename,
|
||||
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,
|
||||
@@ -1678,10 +1677,9 @@ read_dbx_symtab (minimal_symbol_reader &reader,
|
||||
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 ());
|
||||
@@ -1737,10 +1735,9 @@ read_dbx_symtab (minimal_symbol_reader &reader,
|
||||
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 ());
|
||||
@@ -2036,7 +2033,6 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
|
||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||
{
|
||||
int n;
|
||||
struct bound_minimal_symbol minsym;
|
||||
|
||||
const char *colon = strchr (last_function_name, ':');
|
||||
if (colon == NULL)
|
||||
@@ -2047,7 +2043,8 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
|
||||
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,
|
||||
@@ -2840,7 +2837,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, const char *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)
|
||||
|
||||
@@ -788,7 +788,7 @@ struct cooked_index_functions : public dwarf2_base_index_functions
|
||||
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);
|
||||
|
||||
@@ -667,9 +667,8 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
|
||||
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 ()),
|
||||
@@ -679,9 +678,8 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
|
||||
}
|
||||
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 "
|
||||
@@ -708,12 +706,12 @@ call_site_target::iterate_over_addresses (gdbarch *call_site_gdbarch,
|
||||
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);
|
||||
@@ -820,9 +818,8 @@ func_verify_no_selftailcall (struct gdbarch *gdbarch, CORE_ADDR verify_addr)
|
||||
{
|
||||
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 "
|
||||
@@ -846,7 +843,7 @@ static void
|
||||
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 ? "???"
|
||||
@@ -1064,10 +1061,10 @@ call_site_find_chain_1 (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
|
||||
|
||||
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 "
|
||||
@@ -1165,8 +1162,7 @@ dwarf_expr_reg_to_entry_parameter (const frame_info_ptr &initial_frame,
|
||||
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,
|
||||
@@ -1181,8 +1177,7 @@ dwarf_expr_reg_to_entry_parameter (const frame_info_ptr &initial_frame,
|
||||
|
||||
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)"),
|
||||
|
||||
@@ -2997,7 +2997,7 @@ recursively_find_pc_sect_compunit_symtab (struct compunit_symtab *cust,
|
||||
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)
|
||||
|
||||
@@ -844,7 +844,7 @@ struct dwarf2_base_index_functions : public quick_symbol_functions
|
||||
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;
|
||||
|
||||
|
||||
@@ -694,13 +694,12 @@ elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp)
|
||||
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)
|
||||
|
||||
@@ -2059,7 +2059,7 @@ fbsd_get_thread_local_address (struct gdbarch *gdbarch, CORE_ADDR dtv_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 ());
|
||||
|
||||
|
||||
@@ -1062,14 +1062,13 @@ frv_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
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
|
||||
@@ -1374,14 +1373,14 @@ frv_frame_this_id (const frame_info_ptr &this_frame,
|
||||
= 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;
|
||||
|
||||
|
||||
@@ -174,8 +174,8 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
|
||||
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.
|
||||
@@ -195,7 +195,8 @@ ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
|
||||
|
||||
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
|
||||
|
||||
@@ -52,13 +52,13 @@ glibc_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
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. */
|
||||
|
||||
@@ -186,7 +186,6 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
|
||||
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;
|
||||
@@ -239,7 +238,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
|
||||
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))
|
||||
|
||||
@@ -1178,14 +1178,13 @@ static std::string
|
||||
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));
|
||||
@@ -1229,7 +1228,6 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -1238,7 +1236,7 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
|
||||
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;
|
||||
@@ -1251,7 +1249,8 @@ gnuv3_skip_trampoline (const frame_info_ptr &frame, CORE_ADDR stop_pc)
|
||||
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;
|
||||
|
||||
|
||||
@@ -569,10 +569,9 @@ variable: name_not_typename
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -54,9 +54,7 @@ static const char GO_MAIN_MAIN[] = "main.main";
|
||||
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;
|
||||
|
||||
|
||||
@@ -194,9 +194,7 @@ hppa_extract_17 (unsigned word)
|
||||
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
|
||||
|
||||
@@ -1946,12 +1946,11 @@ i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
/* 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)
|
||||
|
||||
@@ -3615,9 +3615,7 @@ ia64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||
/* 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 ()))
|
||||
|
||||
@@ -488,7 +488,7 @@ get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
|
||||
|
||||
{
|
||||
/* 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 ();
|
||||
|
||||
@@ -1360,7 +1360,7 @@ until_next_command (int from_tty)
|
||||
|
||||
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."));
|
||||
|
||||
@@ -4165,7 +4165,7 @@ minsym_found (struct linespec_state *self, struct objfile *objfile,
|
||||
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)
|
||||
{
|
||||
@@ -4202,7 +4202,7 @@ search_minsyms_for_name (struct collect_info *info,
|
||||
struct program_space *search_pspace,
|
||||
struct symtab *symtab)
|
||||
{
|
||||
std::vector<struct bound_minimal_symbol> minsyms;
|
||||
std::vector<bound_minimal_symbol> minsyms;
|
||||
|
||||
if (symtab == NULL)
|
||||
{
|
||||
|
||||
@@ -638,9 +638,7 @@ info_checkpoints_command (const char *arg, int from_tty)
|
||||
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 ());
|
||||
}
|
||||
|
||||
@@ -467,11 +467,11 @@ verbose_dlsym (void *handle, const char *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;
|
||||
|
||||
|
||||
@@ -2212,7 +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. */
|
||||
struct bound_minimal_symbol mem0
|
||||
bound_minimal_symbol mem0
|
||||
= lookup_minimal_symbol ("mem0", NULL, NULL);
|
||||
|
||||
if (! mem0.minsym)
|
||||
@@ -2244,7 +2244,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. */
|
||||
struct bound_minimal_symbol mem0
|
||||
bound_minimal_symbol mem0
|
||||
= lookup_minimal_symbol ("mem0", NULL, NULL);
|
||||
|
||||
if (! mem0.minsym)
|
||||
@@ -2421,11 +2421,9 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
|
||||
{
|
||||
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"
|
||||
@@ -2438,7 +2436,8 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
|
||||
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. */
|
||||
@@ -2502,7 +2501,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
|
||||
{
|
||||
/* 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)
|
||||
{
|
||||
@@ -2512,7 +2511,6 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
|
||||
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.
|
||||
|
||||
@@ -2522,7 +2520,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
|
||||
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
|
||||
|
||||
@@ -800,14 +800,14 @@ m32r_frame_this_id (const frame_info_ptr &this_frame,
|
||||
= 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;
|
||||
|
||||
|
||||
@@ -210,9 +210,7 @@ static int soft_reg_initialized = 0;
|
||||
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 ();
|
||||
@@ -591,12 +589,10 @@ m68hc11_analyze_instruction (struct gdbarch *gdbarch,
|
||||
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;
|
||||
|
||||
|
||||
@@ -390,13 +390,13 @@ static CORE_ADDR
|
||||
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);
|
||||
|
||||
@@ -546,7 +546,6 @@ maintenance_translate_address (const char *arg, int from_tty)
|
||||
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)"));
|
||||
@@ -577,6 +576,7 @@ maintenance_translate_address (const char *arg, int from_tty)
|
||||
|
||||
address = parse_and_eval_address (p);
|
||||
|
||||
bound_minimal_symbol sym;
|
||||
if (sect)
|
||||
sym = lookup_minimal_symbol_by_pc_section (address, sect);
|
||||
else
|
||||
|
||||
@@ -95,8 +95,7 @@ output_debug_symbol (ui_out *uiout, domain_search_flags kind,
|
||||
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);
|
||||
|
||||
@@ -358,7 +358,7 @@ lookup_minimal_symbol_demangled (const lookup_name_info &lookup_name,
|
||||
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)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ lookup_minimal_symbol (const char *name, const char *sfile,
|
||||
|
||||
/* See minsyms.h. */
|
||||
|
||||
struct bound_minimal_symbol
|
||||
bound_minimal_symbol
|
||||
lookup_bound_minimal_symbol (const char *name)
|
||||
{
|
||||
return lookup_minimal_symbol (name, NULL, NULL);
|
||||
@@ -488,9 +488,7 @@ int
|
||||
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 ();
|
||||
|
||||
@@ -591,7 +589,7 @@ lookup_minimal_symbol_linkage (const char *name, struct objfile *objf)
|
||||
|
||||
/* 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 ())
|
||||
@@ -613,12 +611,12 @@ lookup_minimal_symbol_linkage (const char *name, bool only_main)
|
||||
|
||||
/* 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;
|
||||
|
||||
@@ -765,7 +763,6 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
|
||||
struct minimal_symbol *msymbol;
|
||||
struct minimal_symbol *best_symbol = NULL;
|
||||
struct objfile *best_objfile = NULL;
|
||||
struct bound_minimal_symbol result;
|
||||
|
||||
if (previous != nullptr)
|
||||
{
|
||||
@@ -997,6 +994,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
|
||||
}
|
||||
}
|
||||
|
||||
bound_minimal_symbol result;
|
||||
result.minsym = best_symbol;
|
||||
result.objfile = best_objfile;
|
||||
return result;
|
||||
@@ -1004,7 +1002,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
|
||||
|
||||
/* 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);
|
||||
@@ -1598,7 +1596,7 @@ find_solib_trampoline_target (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
/* 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;
|
||||
|
||||
@@ -205,14 +205,13 @@ 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. */
|
||||
|
||||
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
|
||||
@@ -222,8 +221,8 @@ struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *);
|
||||
|
||||
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
|
||||
@@ -232,16 +231,16 @@ struct bound_minimal_symbol lookup_minimal_symbol_text (const char *,
|
||||
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
|
||||
@@ -287,7 +286,7 @@ enum class lookup_msym_prefer
|
||||
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,
|
||||
@@ -299,7 +298,7 @@ struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section
|
||||
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
|
||||
@@ -318,7 +317,7 @@ void iterate_over_minimal_symbols
|
||||
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
|
||||
|
||||
@@ -468,8 +468,7 @@ static const struct tramp_frame mips64_fbsd_sigframe =
|
||||
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 ());
|
||||
|
||||
|
||||
@@ -699,9 +699,8 @@ mips_linux_in_dynsym_resolve_code (CORE_ADDR pc)
|
||||
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 ());
|
||||
|
||||
@@ -490,10 +490,10 @@ mips_make_symbol_special (struct symbol *sym, struct objfile *objfile)
|
||||
/* 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);
|
||||
@@ -1212,13 +1212,12 @@ show_mask_address (struct ui_file *file, int from_tty,
|
||||
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
|
||||
@@ -1230,13 +1229,12 @@ mips_pc_is_mips (CORE_ADDR memaddr)
|
||||
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
|
||||
@@ -1248,14 +1246,13 @@ mips_pc_is_mips16 (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||
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
|
||||
@@ -1268,14 +1265,13 @@ mips_pc_is_micromips (struct gdbarch *gdbarch, CORE_ADDR memaddr)
|
||||
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))
|
||||
@@ -3841,7 +3837,6 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
|
||||
{
|
||||
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)
|
||||
@@ -3852,7 +3847,7 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
/* 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."))
|
||||
@@ -7824,7 +7819,6 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
{
|
||||
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];
|
||||
@@ -7832,7 +7826,7 @@ mips_skip_pic_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
/* 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
|
||||
|
||||
@@ -807,11 +807,10 @@ msp430_in_return_stub (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
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;
|
||||
|
||||
|
||||
@@ -348,9 +348,8 @@ nbsd_gdb_signal_to_target (struct gdbarch *gdbarch,
|
||||
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
|
||||
|
||||
@@ -1137,8 +1137,7 @@ find_imps (const char *method, std::vector<const char *> *symbol_names)
|
||||
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 ());
|
||||
@@ -1240,10 +1239,9 @@ find_objc_msgsend (void)
|
||||
|
||||
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);
|
||||
|
||||
@@ -600,11 +600,10 @@ public:
|
||||
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,
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
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
|
||||
|
||||
@@ -717,11 +717,10 @@ variable: name_not_typename
|
||||
}
|
||||
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);
|
||||
|
||||
@@ -59,9 +59,8 @@ static const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program";
|
||||
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. */
|
||||
|
||||
@@ -225,8 +225,8 @@ pascal_language::value_print_inner (struct value *val,
|
||||
{
|
||||
/* 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
|
||||
|
||||
@@ -145,7 +145,7 @@ parser_state::push_symbol (const char *name, block_symbol sym)
|
||||
}
|
||||
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)
|
||||
@@ -162,7 +162,6 @@ void
|
||||
parser_state::push_dollar (struct stoken str)
|
||||
{
|
||||
struct block_symbol sym;
|
||||
struct bound_minimal_symbol msym;
|
||||
struct internalvar *isym = NULL;
|
||||
std::string copy;
|
||||
|
||||
@@ -232,7 +231,7 @@ parser_state::push_dollar (struct stoken str)
|
||||
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);
|
||||
|
||||
@@ -313,15 +313,13 @@ static const struct ppc_insn_pattern powerpc32_plt_stub_so_2[] =
|
||||
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))
|
||||
@@ -1670,10 +1668,9 @@ ppc_elfv2_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
|
||||
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;
|
||||
|
||||
|
||||
@@ -1044,12 +1044,10 @@ static int
|
||||
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
|
||||
@@ -1061,8 +1059,9 @@ convert_code_addr_to_desc_addr (CORE_ADDR code_addr, CORE_ADDR *desc_addr)
|
||||
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. */
|
||||
|
||||
@@ -606,7 +606,6 @@ build_address_symbolic (struct gdbarch *gdbarch,
|
||||
int *line, /* OUT */
|
||||
int *unmapped) /* OUT */
|
||||
{
|
||||
struct bound_minimal_symbol msymbol;
|
||||
struct symbol *symbol;
|
||||
CORE_ADDR name_location = 0;
|
||||
struct obj_section *section = NULL;
|
||||
@@ -638,7 +637,8 @@ build_address_symbolic (struct gdbarch *gdbarch,
|
||||
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)
|
||||
@@ -1575,7 +1575,6 @@ info_address_command (const char *exp, int from_tty)
|
||||
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;
|
||||
@@ -1601,7 +1600,7 @@ info_address_command (const char *exp, int from_tty)
|
||||
return;
|
||||
}
|
||||
|
||||
msymbol = lookup_bound_minimal_symbol (exp);
|
||||
bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (exp);
|
||||
|
||||
if (msymbol.minsym != NULL)
|
||||
{
|
||||
@@ -1753,9 +1752,8 @@ info_address_command (const char *exp, int from_tty)
|
||||
|
||||
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
|
||||
|
||||
@@ -87,7 +87,7 @@ static struct partial_symtab *
|
||||
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;
|
||||
@@ -161,7 +161,7 @@ struct partial_symtab *
|
||||
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))
|
||||
@@ -181,12 +181,11 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *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,
|
||||
@@ -1281,7 +1280,7 @@ maintenance_print_psymbols (const char *args, int from_tty)
|
||||
|
||||
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). */
|
||||
|
||||
@@ -636,8 +636,8 @@ struct psymbol_functions : public quick_symbol_functions
|
||||
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
|
||||
@@ -672,11 +672,10 @@ struct psymbol_functions : public quick_symbol_functions
|
||||
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:
|
||||
|
||||
|
||||
@@ -923,12 +923,12 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
|
||||
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 ();
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ struct quick_symbol_functions
|
||||
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
|
||||
|
||||
@@ -326,12 +326,11 @@ ravenscar_thread_target::add_active_thread ()
|
||||
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
|
||||
@@ -348,14 +347,13 @@ get_running_thread_msymbol ()
|
||||
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)
|
||||
@@ -377,7 +375,7 @@ ravenscar_thread_target::runtime_initialized ()
|
||||
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;
|
||||
|
||||
@@ -5504,13 +5504,12 @@ remote_target::remote_check_symbols ()
|
||||
|
||||
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]);
|
||||
|
||||
@@ -2250,7 +2250,7 @@ rs6000_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
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
|
||||
@@ -2324,7 +2324,6 @@ rs6000_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
unsigned int ii, op;
|
||||
int rel;
|
||||
CORE_ADDR solib_target_pc;
|
||||
struct bound_minimal_symbol msymbol;
|
||||
|
||||
static unsigned trampoline_code[] =
|
||||
{
|
||||
@@ -2339,7 +2338,7 @@ rs6000_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
|
||||
};
|
||||
|
||||
/* 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 ()))
|
||||
|
||||
@@ -759,9 +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)
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -1068,7 +1066,7 @@ info_cb (const td_thrhandle_t *th, void *s)
|
||||
/* 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",
|
||||
@@ -1081,7 +1079,7 @@ info_cb (const td_thrhandle_t *th, void *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",
|
||||
|
||||
@@ -63,9 +63,7 @@ sol2_sigtramp_p (const frame_info_ptr &this_frame)
|
||||
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 ());
|
||||
|
||||
|
||||
@@ -434,7 +434,6 @@ static CORE_ADDR
|
||||
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);
|
||||
@@ -451,8 +450,9 @@ lm_base (void)
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -264,7 +264,6 @@ static CORE_ADDR
|
||||
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];
|
||||
|
||||
@@ -280,8 +279,9 @@ lm_base (void)
|
||||
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.");
|
||||
@@ -840,10 +840,9 @@ frv_relocate_section_addresses (solib &so, target_section *sec)
|
||||
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;
|
||||
|
||||
|
||||
@@ -695,7 +695,6 @@ scan_dyntag_auxv (const int desired_dyntag, CORE_ADDR *ptr,
|
||||
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 ())
|
||||
@@ -751,8 +750,9 @@ elf_locate_base (void)
|
||||
|
||||
/* 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 ();
|
||||
|
||||
@@ -2227,7 +2227,6 @@ svr4_create_solib_event_breakpoints (svr4_info *info, struct gdbarch *gdbarch,
|
||||
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;
|
||||
@@ -2482,7 +2481,8 @@ 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++)
|
||||
{
|
||||
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))
|
||||
{
|
||||
@@ -2501,7 +2501,8 @@ enable_break (struct svr4_info *info, int from_tty)
|
||||
{
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -1299,13 +1299,12 @@ find_frame_funname (const frame_info_ptr &frame, enum language *funlang,
|
||||
}
|
||||
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 ()));
|
||||
@@ -1529,9 +1528,7 @@ info_frame_command_core (const frame_info_ptr &fi, bool selected_frame_p)
|
||||
}
|
||||
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 ();
|
||||
|
||||
@@ -399,7 +399,7 @@ objfile::expand_symtabs_matching
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
@@ -3428,14 +3428,13 @@ read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr,
|
||||
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: "
|
||||
@@ -3444,7 +3443,8 @@ simple_read_overlay_table (void)
|
||||
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 "
|
||||
@@ -3523,7 +3523,7 @@ simple_overlay_update (struct obj_section *osect)
|
||||
{
|
||||
/* 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)
|
||||
|
||||
16
gdb/symtab.c
16
gdb/symtab.c
@@ -2892,14 +2892,14 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -3091,7 +3091,6 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
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. */
|
||||
|
||||
@@ -3170,13 +3169,12 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
* 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
|
||||
@@ -3919,7 +3917,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
|
||||
}
|
||||
else
|
||||
{
|
||||
struct bound_minimal_symbol msymbol
|
||||
bound_minimal_symbol msymbol
|
||||
= lookup_minimal_symbol_by_pc_section (sal->pc, sal->section);
|
||||
|
||||
if (msymbol.minsym == NULL)
|
||||
@@ -5290,7 +5288,7 @@ print_symbol_info (struct symbol *sym, int block, const char *last)
|
||||
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;
|
||||
|
||||
@@ -2599,7 +2599,7 @@ struct symbol_search
|
||||
|
||||
/* 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:
|
||||
|
||||
|
||||
@@ -2455,7 +2455,6 @@ tfind_outside_command (const char *args, int from_tty)
|
||||
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;
|
||||
@@ -2579,17 +2578,20 @@ info_scope_command (const char *args_in, int from_tty)
|
||||
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;
|
||||
|
||||
@@ -157,11 +157,11 @@ tui_disassemble (struct gdbarch *gdbarch,
|
||||
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)
|
||||
@@ -402,7 +402,7 @@ tui_get_begin_asm_address (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
|
||||
|
||||
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 ();
|
||||
|
||||
@@ -129,8 +129,7 @@ find_function_in_inferior (const char *name, struct objfile **objf_p)
|
||||
}
|
||||
else
|
||||
{
|
||||
struct bound_minimal_symbol msymbol =
|
||||
lookup_bound_minimal_symbol (name);
|
||||
bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
|
||||
|
||||
if (msymbol.minsym != NULL)
|
||||
{
|
||||
|
||||
@@ -2988,7 +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. */
|
||||
struct bound_minimal_symbol msym
|
||||
bound_minimal_symbol msym
|
||||
= lookup_minimal_symbol (phys_name, NULL, NULL);
|
||||
struct type *field_type = type->field (fieldno).type ();
|
||||
|
||||
@@ -3171,7 +3171,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f,
|
||||
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;
|
||||
|
||||
@@ -42,7 +42,7 @@ bool
|
||||
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;
|
||||
|
||||
|
||||
@@ -356,8 +356,8 @@ 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 */
|
||||
{
|
||||
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 ();
|
||||
@@ -621,8 +621,8 @@ z80_frame_unwind_cache (const frame_info_ptr &this_frame,
|
||||
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 ())
|
||||
@@ -719,8 +719,8 @@ z80_breakpoint_kind_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr)
|
||||
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
|
||||
@@ -894,14 +894,13 @@ read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr,
|
||||
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: "
|
||||
@@ -910,7 +909,8 @@ z80_read_overlay_region_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 "
|
||||
|
||||
Reference in New Issue
Block a user