+2014-02-26 Tom Tromey <tromey@redhat.com>
+
+ * symtab.h (struct minimal_symbol) <mginfo>: Rename from ginfo.
+ (MSYMBOL_VALUE, MSYMBOL_VALUE_ADDRESS, MSYMBOL_VALUE_BYTES)
+ (MSYMBOL_BLOCK_VALUE, MSYMBOL_VALUE_CHAIN, MSYMBOL_LANGUAGE)
+ (MSYMBOL_SECTION, MSYMBOL_OBJ_SECTION, MSYMBOL_NATURAL_NAME)
+ (MSYMBOL_LINKAGE_NAME, MSYMBOL_PRINT_NAME, MSYMBOL_DEMANGLED_NAME)
+ (MSYMBOL_SET_LANGUAGE, MSYMBOL_SEARCH_NAME)
+ (MSYMBOL_MATCHES_SEARCH_NAME, MSYMBOL_SET_NAMES): New macros.
+ * ada-lang.c (ada_main_name): Update.
+ (ada_lookup_simple_minsym): Update.
+ (ada_make_symbol_completion_list): Update.
+ (ada_add_standard_exceptions): Update.
+ * ada-tasks.c (read_atcb, ada_tasks_inferior_data_sniffer): Update.
+ * aix-thread.c (pdc_symbol_addrs, pd_enable): Update.
+ * amd64-windows-tdep.c (amd64_skip_main_prologue): Update.
+ * arm-tdep.c (skip_prologue_function): Update.
+ (arm_skip_stack_protector, arm_skip_stub): Update.
+ * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
+ (arm_wince_skip_main_prologue): Update.
+ * auxv.c (ld_so_xfer_auxv): Update.
+ * avr-tdep.c (avr_scan_prologue): Update.
+ * ax-gdb.c (gen_var_ref): Update.
+ * block.c (call_site_for_pc): Update.
+ * blockframe.c (get_pc_function_start): Update.
+ (find_pc_partial_function_gnu_ifunc): Update.
+ * breakpoint.c (create_overlay_event_breakpoint): Update.
+ (create_longjmp_master_breakpoint): Update.
+ (create_std_terminate_master_breakpoint): Update.
+ (create_exception_master_breakpoint): Update.
+ (resolve_sal_pc): Update.
+ * bsd-uthread.c (bsd_uthread_lookup_address): Update.
+ * btrace.c (ftrace_print_function_name, ftrace_function_switched):
+ Update.
+ * c-valprint.c (c_val_print): Update.
+ * coff-pe-read.c (add_pe_forwarded_sym): Update.
+ * coffread.c (coff_symfile_read): Update.
+ * common/agent.c (agent_look_up_symbols): Update.
+ * dbxread.c (find_stab_function_addr): Update.
+ (end_psymtab): Update.
+ * dwarf2loc.c (call_site_to_target_addr): Update.
+ (func_verify_no_selftailcall): Update.
+ (tailcall_dump): Update.
+ (call_site_find_chain_1): Update.
+ (dwarf_expr_reg_to_entry_parameter): Update.
+ * elfread.c (elf_gnu_ifunc_record_cache): Update.
+ (elf_gnu_ifunc_resolve_by_got): Update.
+ * f-valprint.c (info_common_command): Update.
+ * findvar.c (read_var_value): Update.
+ * frame.c (get_prev_frame_1): Update.
+ (inside_main_func): Update.
+ * frv-tdep.c (frv_skip_main_prologue): Update.
+ (frv_frame_this_id): Update.
+ * glibc-tdep.c (glibc_skip_solib_resolver): Update.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Update.
+ * gnu-v3-abi.c (gnuv3_rtti_type): Update.
+ (gnuv3_skip_trampoline): Update.
+ * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline): Update.
+ (hppa64_hpux_in_solib_call_trampoline): Update.
+ (hppa_hpux_skip_trampoline_code): Update.
+ (hppa64_hpux_search_dummy_call_sequence): Update.
+ (hppa_hpux_find_import_stub_for_addr): Update.
+ (hppa_hpux_find_dummy_bpaddr): Update.
+ * hppa-tdep.c (hppa_symbol_address)
+ (hppa_lookup_stub_minimal_symbol): Update.
+ * i386-tdep.c (i386_skip_main_prologue): Update.
+ (i386_pe_skip_trampoline_code): Update.
+ * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Update.
+ * infcall.c (get_function_name): Update.
+ * infcmd.c (until_next_command): Update.
+ * jit.c (jit_breakpoint_re_set_internal): Update.
+ (jit_inferior_init): Update.
+ * linespec.c (minsym_found): Update.
+ (add_minsym): Update.
+ * linux-fork.c (info_checkpoints_command): Update.
+ * linux-nat.c (get_signo): Update.
+ * linux-thread-db.c (inferior_has_bug): Update.
+ * m32c-tdep.c (m32c_return_value): Update.
+ (m32c_m16c_address_to_pointer): Update.
+ (m32c_m16c_pointer_to_address): Update.
+ * m32r-tdep.c (m32r_frame_this_id): Update.
+ * m68hc11-tdep.c (m68hc11_get_register_info): Update.
+ * machoread.c (macho_resolve_oso_sym_with_minsym): Update.
+ * maint.c (maintenance_translate_address): Update.
+ * minsyms.c (add_minsym_to_hash_table): Update.
+ (add_minsym_to_demangled_hash_table): Update.
+ (msymbol_objfile): Update.
+ (lookup_minimal_symbol): Update.
+ (iterate_over_minimal_symbols): Update.
+ (lookup_minimal_symbol_text): Update.
+ (lookup_minimal_symbol_by_pc_name): Update.
+ (lookup_minimal_symbol_solib_trampoline): Update.
+ (lookup_minimal_symbol_by_pc_section_1): Update.
+ (lookup_minimal_symbol_and_objfile): Update.
+ (prim_record_minimal_symbol_full): Update.
+ (compare_minimal_symbols): Update.
+ (compact_minimal_symbols): Update.
+ (build_minimal_symbol_hash_tables): Update.
+ (install_minimal_symbols): Update.
+ (terminate_minimal_symbol_table): Update.
+ (find_solib_trampoline_target): Update.
+ (minimal_symbol_upper_bound): Update.
+ * mips-linux-tdep.c (mips_linux_skip_resolver): Update.
+ * mips-tdep.c (mips_stub_frame_sniffer): Update.
+ (mips_skip_pic_trampoline_code): Update.
+ * msp430-tdep.c (msp430_skip_trampoline_code): Update.
+ * objc-lang.c (selectors_info): Update.
+ (classes_info): Update.
+ (find_methods): Update.
+ (find_imps): Update.
+ (find_objc_msgsend): Update.
+ * objfiles.c (objfile_relocate1): Update.
+ * objfiles.h (ALL_OBJFILE_MSYMBOLS): Update.
+ * obsd-tdep.c (obsd_skip_solib_resolver): Update.
+ * p-valprint.c (pascal_val_print): Update.
+ * parse.c (write_exp_msymbol): Update.
+ * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code)
+ (ppc_linux_spe_context_lookup, ppc_elfv2_skip_entrypoint): Update.
+ * ppc-sysv-tdep.c (convert_code_addr_to_desc_addr): Update.
+ * printcmd.c (build_address_symbolic): Update.
+ (sym_info): Update.
+ (address_info): Update.
+ * proc-service.c (ps_pglobal_lookup): Update.
+ * psymtab.c (find_pc_sect_psymtab_closer): Update.
+ (find_pc_sect_psymtab): Update.
+ * python/py-framefilter.c (py_print_frame): Update.
+ * ravenscar-thread.c (get_running_thread_id): Update.
+ * record-btrace.c (btrace_call_history, btrace_get_bfun_name):
+ Update.
+ * remote.c (remote_check_symbols): Update.
+ * rs6000-tdep.c (rs6000_skip_main_prologue): Update.
+ (rs6000_skip_trampoline_code): Update.
+ * sh64-tdep.c (sh64_elf_make_msymbol_special): Update.
+ * sol2-tdep.c (sol2_skip_solib_resolver): Update.
+ * solib-dsbt.c (lm_base): Update.
+ * solib-frv.c (lm_base): Update.
+ (main_got): Update.
+ * solib-irix.c (locate_base): Update.
+ * solib-som.c (som_solib_create_inferior_hook): Update.
+ (som_solib_desire_dynamic_linker_symbols): Update.
+ (link_map_start): Update.
+ * solib-spu.c (spu_enable_break): Update.
+ (ocl_enable_break): Update.
+ * solib-svr4.c (elf_locate_base): Update.
+ (enable_break): Update.
+ * spu-tdep.c (spu_get_overlay_table): Update.
+ (spu_catch_start): Update.
+ (flush_ea_cache): Update.
+ * stabsread.c (define_symbol): Update.
+ (scan_file_globals): Update.
+ * stack.c (find_frame_funname): Update.
+ (frame_info): Update.
+ * symfile.c (simple_read_overlay_table): Update.
+ (simple_overlay_update): Update.
+ * symmisc.c (dump_msymbols): Update.
+ * symtab.c (fixup_section): Update.
+ (find_pc_sect_line): Update.
+ (skip_prologue_sal): Update.
+ (search_symbols): Update.
+ (print_msymbol_info): Update.
+ (rbreak_command): Update.
+ (MCOMPLETION_LIST_ADD_SYMBOL): New macro.
+ (completion_list_objc_symbol): Update.
+ (default_make_symbol_completion_list_break_on): Update.
+ * tracepoint.c (scope_info): Update.
+ * tui/tui-disasm.c (tui_find_disassembly_address): Update.
+ (tui_get_begin_asm_address): Update.
+ * valops.c (find_function_in_inferior): Update.
+ * value.c (value_static_field): Update.
+ (value_fn_field): Update.
+
2014-02-26 Tom Tromey <tromey@redhat.com>
* blockframe.c (find_pc_partial_function_gnu_ifunc): Use
CORE_ADDR main_program_name_addr;
int err_code;
- main_program_name_addr = SYMBOL_VALUE_ADDRESS (msym);
+ main_program_name_addr = MSYMBOL_VALUE_ADDRESS (msym);
if (main_program_name_addr == 0)
error (_("Invalid address for Ada main program name."));
ALL_MSYMBOLS (objfile, msymbol)
{
- if (match_name (SYMBOL_LINKAGE_NAME (msymbol), name, wild_match_p)
+ if (match_name (MSYMBOL_LINKAGE_NAME (msymbol), name, wild_match_p)
&& MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
{
result.minsym = msymbol;
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- symbol_completion_add (&completions, SYMBOL_LINKAGE_NAME (msymbol),
+ symbol_completion_add (&completions, MSYMBOL_LINKAGE_NAME (msymbol),
text, text_len, text0, word, wild_match_p,
encoded_p);
}
if (msymbol.minsym != NULL)
{
struct ada_exc_info info
- = {standard_exc[i], SYMBOL_VALUE_ADDRESS (msymbol.minsym)};
+ = {standard_exc[i], MSYMBOL_VALUE_ADDRESS (msymbol.minsym)};
VEC_safe_push (ada_exc_info, *exceptions, &info);
}
msym = lookup_minimal_symbol_by_pc (task_id);
if (msym.minsym)
{
- const char *full_name = SYMBOL_LINKAGE_NAME (msym.minsym);
+ const char *full_name = MSYMBOL_LINKAGE_NAME (msym.minsym);
const char *task_name = full_name;
const char *p;
if (msym != NULL)
{
data->known_tasks_kind = ADA_TASKS_ARRAY;
- data->known_tasks_addr = SYMBOL_VALUE_ADDRESS (msym);
+ data->known_tasks_addr = MSYMBOL_VALUE_ADDRESS (msym);
/* Try to get pointer type and array length from the symtab. */
sym = lookup_symbol_in_language (KNOWN_TASKS_NAME, NULL, VAR_DOMAIN,
if (msym != NULL)
{
data->known_tasks_kind = ADA_TASKS_LIST;
- data->known_tasks_addr = SYMBOL_VALUE_ADDRESS (msym);
+ data->known_tasks_addr = MSYMBOL_VALUE_ADDRESS (msym);
data->known_tasks_length = 1;
sym = lookup_symbol_in_language (KNOWN_TASKS_LIST, NULL, VAR_DOMAIN,
fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE\n");
return PDC_FAILURE;
}
- symbols[i].addr = SYMBOL_VALUE_ADDRESS (ms);
+ symbols[i].addr = MSYMBOL_VALUE_ADDRESS (ms);
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = %s\n",
/* Set a breakpoint on the returned stub function. */
if (!(ms = lookup_minimal_symbol (stub_name, NULL, NULL)))
return;
- pd_brk_addr = SYMBOL_VALUE_ADDRESS (ms);
+ pd_brk_addr = MSYMBOL_VALUE_ADDRESS (ms);
if (!create_thread_event_breakpoint (target_gdbarch (), pd_brk_addr))
return;
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
pc += 5;
}
}
= (indirect_addr
? lookup_minimal_symbol_by_pc (indirect_addr).minsym
: NULL);
- const char *symname = indsym ? SYMBOL_LINKAGE_NAME (indsym) : NULL;
+ const char *symname = indsym ? MSYMBOL_LINKAGE_NAME (indsym) : NULL;
if (symname)
{
msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym != NULL
- && SYMBOL_VALUE_ADDRESS (msym.minsym) == pc
- && SYMBOL_LINKAGE_NAME (msym.minsym) != NULL)
+ && MSYMBOL_VALUE_ADDRESS (msym.minsym) == pc
+ && MSYMBOL_LINKAGE_NAME (msym.minsym) != NULL)
{
- const char *name = SYMBOL_LINKAGE_NAME (msym.minsym);
+ const char *name = MSYMBOL_LINKAGE_NAME (msym.minsym);
/* The GNU linker's Thumb call stub to foo is named
__foo_from_thumb. */
instruction sequence is not for stack protector. If symbol is
removed, we conservatively think this sequence is for stack protector. */
if (stack_chk_guard.minsym
- && strncmp (SYMBOL_LINKAGE_NAME (stack_chk_guard.minsym),
+ && strncmp (MSYMBOL_LINKAGE_NAME (stack_chk_guard.minsym),
"__stack_chk_guard",
strlen ("__stack_chk_guard")) != 0)
return pc;
objfile = (sec == NULL) ? NULL : sec->objfile;
minsym = lookup_minimal_symbol (target_name, NULL, objfile);
if (minsym != NULL)
- return SYMBOL_VALUE_ADDRESS (minsym);
+ return MSYMBOL_VALUE_ADDRESS (minsym);
else
return 0;
}
if (indsym.minsym == NULL)
return 0;
- symname = SYMBOL_LINKAGE_NAME (indsym.minsym);
+ symname = MSYMBOL_LINKAGE_NAME (indsym.minsym);
if (symname == NULL || strncmp (symname, "__imp_", 6) != 0)
return 0;
struct bound_minimal_symbol s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__gccmain") == 0)
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__gccmain") == 0)
pc += 4;
}
resides. DATA_ADDRESS is the inferior value present in
`_dl_auxv', therefore the real inferior AUXV address. */
- pointer_address = SYMBOL_VALUE_ADDRESS (msym);
+ pointer_address = MSYMBOL_VALUE_ADDRESS (msym);
/* The location of the _dl_auxv symbol may no longer be correct if
ld.so runs at a different address than the one present in the
/* Resolve offset (in words) from __prologue_saves__ symbol.
Which is a pushes count in `-mcall-prologues' mode */
- num_pushes = AVR_MAX_PUSHES - (i - SYMBOL_VALUE_ADDRESS (msymbol)) / 2;
+ num_pushes = AVR_MAX_PUSHES - (i - MSYMBOL_VALUE_ADDRESS (msymbol)) / 2;
if (num_pushes > AVR_MAX_PUSHES)
{
error (_("Couldn't resolve symbol `%s'."), SYMBOL_PRINT_NAME (var));
/* Push the address of the variable. */
- ax_const_l (ax, SYMBOL_VALUE_ADDRESS (msym));
+ ax_const_l (ax, MSYMBOL_VALUE_ADDRESS (msym));
value->kind = axs_lvalue_memory;
}
break;
"DW_TAG_GNU_call_site %s in %s"),
paddress (gdbarch, pc),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)));
+ : MSYMBOL_PRINT_NAME (msym.minsym)));
}
return *slot;
msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym)
{
- CORE_ADDR fstart = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ CORE_ADDR fstart = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
if (find_pc_section (fstart))
return fstart;
if (f != NULL
&& (msymbol.minsym == NULL
|| (BLOCK_START (SYMBOL_BLOCK_VALUE (f))
- >= SYMBOL_VALUE_ADDRESS (msymbol.minsym))))
+ >= MSYMBOL_VALUE_ADDRESS (msymbol.minsym))))
{
cache_pc_function_low = BLOCK_START (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
return 0;
}
- cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
- cache_pc_function_name = SYMBOL_LINKAGE_NAME (msymbol.minsym);
+ cache_pc_function_low = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ cache_pc_function_name = MSYMBOL_LINKAGE_NAME (msymbol.minsym);
cache_pc_function_section = section;
cache_pc_function_is_gnu_ifunc = (MSYMBOL_TYPE (msymbol.minsym)
== mst_text_gnu_ifunc);
bp_objfile_data->overlay_msym = m;
}
- addr = SYMBOL_VALUE_ADDRESS (bp_objfile_data->overlay_msym);
+ addr = MSYMBOL_VALUE_ADDRESS (bp_objfile_data->overlay_msym);
b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
bp_overlay_event,
&internal_breakpoint_ops);
bp_objfile_data->longjmp_msym[i] = m;
}
- addr = SYMBOL_VALUE_ADDRESS (bp_objfile_data->longjmp_msym[i]);
+ addr = MSYMBOL_VALUE_ADDRESS (bp_objfile_data->longjmp_msym[i]);
b = create_internal_breakpoint (gdbarch, addr, bp_longjmp_master,
&internal_breakpoint_ops);
b->addr_string = xstrdup (func_name);
bp_objfile_data->terminate_msym = m;
}
- addr = SYMBOL_VALUE_ADDRESS (bp_objfile_data->terminate_msym);
+ addr = MSYMBOL_VALUE_ADDRESS (bp_objfile_data->terminate_msym);
b = create_internal_breakpoint (get_objfile_arch (objfile), addr,
bp_std_terminate_master,
&internal_breakpoint_ops);
bp_objfile_data->exception_msym = debug_hook;
}
- addr = SYMBOL_VALUE_ADDRESS (bp_objfile_data->exception_msym);
+ addr = MSYMBOL_VALUE_ADDRESS (bp_objfile_data->exception_msym);
addr = gdbarch_convert_from_func_ptr_addr (gdbarch, addr,
¤t_target);
b = create_internal_breakpoint (gdbarch, addr, bp_exception_master,
msym = lookup_minimal_symbol_by_pc (sal->pc);
if (msym.minsym)
- sal->section = SYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
+ sal->section = MSYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
do_cleanups (old_chain);
}
sym = lookup_minimal_symbol (name, NULL, objfile);
if (sym)
- return SYMBOL_VALUE_ADDRESS (sym);
+ return MSYMBOL_VALUE_ADDRESS (sym);
return 0;
}
return SYMBOL_PRINT_NAME (sym);
if (msym != NULL)
- return SYMBOL_PRINT_NAME (msym);
+ return MSYMBOL_PRINT_NAME (msym);
return "<unknown>";
}
/* If the minimal symbol changed, we certainly switched functions. */
if (mfun != NULL && msym != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (mfun), SYMBOL_LINKAGE_NAME (msym)) != 0)
+ && strcmp (MSYMBOL_LINKAGE_NAME (mfun), MSYMBOL_LINKAGE_NAME (msym)) != 0)
return 1;
/* If the symbol changed, we certainly switched functions. */
/* If 'symbol_print' is set, we did the work above. */
if (!options->symbol_print
&& (msymbol.minsym != NULL)
- && (vt_address == SYMBOL_VALUE_ADDRESS (msymbol.minsym)))
+ && (vt_address == MSYMBOL_VALUE_ADDRESS (msymbol.minsym)))
{
if (want_space)
fputs_filtered (" ", stream);
fputs_filtered (" <", stream);
- fputs_filtered (SYMBOL_PRINT_NAME (msymbol.minsym), stream);
+ fputs_filtered (MSYMBOL_PRINT_NAME (msymbol.minsym), stream);
fputs_filtered (">", stream);
want_space = 1;
}
fputs_filtered (" ", stream);
if (msymbol.minsym != NULL)
- wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol.minsym),
+ wsym = lookup_symbol (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
block, VAR_DOMAIN,
&is_this_fld);
" \"%s\" in dll \"%s\", pointing to \"%s\"\n"),
sym_name, dll_name, forward_qualified_name);
- vma = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ vma = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
msymtype = MSYMBOL_TYPE (msymbol.minsym);
- section = SYMBOL_SECTION (msymbol.minsym);
+ section = MSYMBOL_SECTION (msymbol.minsym);
/* Generate a (hopefully unique) qualified name using the first part
of the dll name, e.g. KERNEL32!AddAtomA. This matches the style
ALL_OBJFILE_MSYMBOLS (objfile, msym)
{
- const char *name = SYMBOL_LINKAGE_NAME (msym);
+ const char *name = MSYMBOL_LINKAGE_NAME (msym);
/* If the minimal symbols whose name are prefixed by "__imp_"
or "_imp_", get rid of the prefix, and search the minimal
(struct objfile *) arg);
if (sym != NULL)
- *addrp = SYMBOL_VALUE_ADDRESS (sym);
+ *addrp = MSYMBOL_VALUE_ADDRESS (sym);
else
#endif
{
msym = lookup_minimal_symbol (p, NULL, objfile);
}
- return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym);
+ return msym == NULL ? 0 : MSYMBOL_VALUE_ADDRESS (msym);
}
static void
}
if (minsym)
- pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + MSYMBOL_SIZE (minsym);
+ pst->texthigh = MSYMBOL_VALUE_ADDRESS (minsym) + MSYMBOL_SIZE (minsym);
last_function_name = NULL;
}
"at %s in %s"),
paddress (call_site_gdbarch, call_site->pc),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)));
+ : MSYMBOL_PRINT_NAME (msym.minsym)));
}
if (caller_frame == NULL)
"available at %s in %s"),
paddress (call_site_gdbarch, call_site->pc),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)));
+ : MSYMBOL_PRINT_NAME (msym.minsym)));
}
caller_arch = get_frame_arch (caller_frame);
_("Cannot find function \"%s\" for a call site target "
"at %s in %s"),
physname, paddress (call_site_gdbarch, call_site->pc),
- msym == NULL ? "???" : SYMBOL_PRINT_NAME (msym));
+ msym == NULL ? "???" : MSYMBOL_PRINT_NAME (msym));
}
- return SYMBOL_VALUE_ADDRESS (msym);
+ return MSYMBOL_VALUE_ADDRESS (msym);
}
case FIELD_LOC_KIND_PHYSADDR:
"function \"%s\" at %s can call itself via tail "
"calls"),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)),
+ : MSYMBOL_PRINT_NAME (msym.minsym)),
paddress (gdbarch, verify_addr));
}
fprintf_unfiltered (gdb_stdlog, " %s(%s)", paddress (gdbarch, addr),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)));
+ : MSYMBOL_PRINT_NAME (msym.minsym)));
}
"callers or callees between caller function \"%s\" at %s "
"and callee function \"%s\" at %s"),
(msym_caller.minsym == NULL
- ? "???" : SYMBOL_PRINT_NAME (msym_caller.minsym)),
+ ? "???" : MSYMBOL_PRINT_NAME (msym_caller.minsym)),
paddress (gdbarch, caller_pc),
(msym_callee.minsym == NULL
- ? "???" : SYMBOL_PRINT_NAME (msym_callee.minsym)),
+ ? "???" : MSYMBOL_PRINT_NAME (msym_callee.minsym)),
paddress (gdbarch, callee_pc));
}
gdbarch_bfd_arch_info (gdbarch)->printable_name,
paddress (gdbarch, func_addr),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)),
+ : MSYMBOL_PRINT_NAME (msym.minsym)),
gdbarch_bfd_arch_info (caller_gdbarch)->printable_name);
}
"requires caller of %s (%s)"),
paddress (gdbarch, func_addr),
(msym.minsym == NULL ? "???"
- : SYMBOL_PRINT_NAME (msym.minsym)));
+ : MSYMBOL_PRINT_NAME (msym.minsym)));
}
caller_pc = get_frame_pc (caller_frame);
call_site = call_site_for_pc (gdbarch, caller_pc);
_("DW_OP_GNU_entry_value resolving expects callee %s at %s "
"but the called frame is for %s at %s"),
(target_msym == NULL ? "???"
- : SYMBOL_PRINT_NAME (target_msym)),
+ : MSYMBOL_PRINT_NAME (target_msym)),
paddress (gdbarch, target_addr),
- func_msym == NULL ? "???" : SYMBOL_PRINT_NAME (func_msym),
+ func_msym == NULL ? "???" : MSYMBOL_PRINT_NAME (func_msym),
paddress (gdbarch, func_addr));
}
throw_error (NO_ENTRY_VALUE_ERROR, _("Cannot find matching parameter "
"at DW_TAG_GNU_call_site %s at %s"),
paddress (gdbarch, caller_pc),
- msym == NULL ? "???" : SYMBOL_PRINT_NAME (msym));
+ msym == NULL ? "???" : MSYMBOL_PRINT_NAME (msym));
}
*per_cu_return = call_site->per_cu;
msym = lookup_minimal_symbol_by_pc (addr);
if (msym.minsym == NULL)
return 0;
- if (SYMBOL_VALUE_ADDRESS (msym.minsym) != addr)
+ if (MSYMBOL_VALUE_ADDRESS (msym.minsym) != addr)
return 0;
/* minimal symbols have always SYMBOL_OBJ_SECTION non-NULL. */
- sect = SYMBOL_OBJ_SECTION (msym.objfile, msym.minsym)->the_bfd_section;
+ sect = MSYMBOL_OBJ_SECTION (msym.objfile, msym.minsym)->the_bfd_section;
objfile = msym.objfile;
/* If .plt jumps back to .plt the symbol is still deferred for later
continue;
if (MSYMBOL_TYPE (msym) != mst_slot_got_plt)
continue;
- pointer_address = SYMBOL_VALUE_ADDRESS (msym);
+ pointer_address = MSYMBOL_VALUE_ADDRESS (msym);
plt = bfd_get_section_by_name (obfd, ".plt");
if (plt == NULL)
if (msym == NULL)
error (_("No global symbol \"%s\"."), SYMBOL_LINKAGE_NAME (var));
if (overlay_debugging)
- addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (msym),
- SYMBOL_OBJ_SECTION (lookup_data.objfile,
- msym));
+ addr = symbol_overlayed_address (MSYMBOL_VALUE_ADDRESS (msym),
+ MSYMBOL_OBJ_SECTION (lookup_data.objfile,
+ msym));
else
- addr = SYMBOL_VALUE_ADDRESS (msym);
+ addr = MSYMBOL_VALUE_ADDRESS (msym);
- obj_section = SYMBOL_OBJ_SECTION (lookup_data.objfile, msym);
+ obj_section = MSYMBOL_OBJ_SECTION (lookup_data.objfile, msym);
if (obj_section
&& (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
addr = target_translate_tls_address (obj_section->objfile, addr);
this_pc_in_block = get_frame_address_in_block (this_frame);
morestack_msym = lookup_minimal_symbol_by_pc (this_pc_in_block).minsym;
if (morestack_msym)
- morestack_name = SYMBOL_LINKAGE_NAME (morestack_msym);
+ morestack_name = MSYMBOL_LINKAGE_NAME (morestack_msym);
if (!morestack_name || strcmp (morestack_name, "__morestack") != 0)
{
if (frame_debug)
/* Make certain that the code, and not descriptor, address is
returned. */
maddr = gdbarch_convert_from_func_ptr_addr (get_frame_arch (this_frame),
- SYMBOL_VALUE_ADDRESS (msymbol),
+ MSYMBOL_VALUE_ADDRESS (msymbol),
¤t_target);
return maddr == get_frame_func (this_frame);
}
s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
{
pc += 4;
return pc;
/* Check if the stack is empty. */
msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
- if (msym_stack && info->base == SYMBOL_VALUE_ADDRESS (msym_stack))
+ if (msym_stack && info->base == MSYMBOL_VALUE_ADDRESS (msym_stack))
return;
/* Hopefully the prologue analysis either correctly determined the
if (! fixup)
fixup = lookup_minimal_symbol ("fixup", NULL, resolver.objfile);
- if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
+ if (fixup && MSYMBOL_VALUE_ADDRESS (fixup) == pc)
return frame_unwind_caller_pc (get_current_frame ());
}
/* Try to find a symbol that is the vtable. */
minsym=lookup_minimal_symbol_by_pc(vtbl);
if (minsym.minsym==NULL
- || (linkage_name=SYMBOL_LINKAGE_NAME (minsym.minsym))==NULL
+ || (linkage_name=MSYMBOL_LINKAGE_NAME (minsym.minsym))==NULL
|| !is_vtable_name (linkage_name))
return NULL;
If we didn't like this approach, we could instead look in the
type_info object itself to get the class name. But this way
should work just as well, and doesn't read target memory. */
- vtable_symbol_name = SYMBOL_DEMANGLED_NAME (vtable_symbol);
+ vtable_symbol_name = MSYMBOL_DEMANGLED_NAME (vtable_symbol);
if (vtable_symbol_name == NULL
|| strncmp (vtable_symbol_name, "vtable for ", 11))
{
if (minsym == NULL)
error (_("could not find typeinfo symbol for '%s'"), typename);
- result = value_at_lazy (typeinfo_type, SYMBOL_VALUE_ADDRESS (minsym));
+ result = value_at_lazy (typeinfo_type, MSYMBOL_VALUE_ADDRESS (minsym));
}
do_cleanups (cleanup);
#define TYPEINFO_PREFIX "typeinfo for "
#define TYPEINFO_PREFIX_LEN (sizeof (TYPEINFO_PREFIX) - 1)
- symname = SYMBOL_DEMANGLED_NAME (typeinfo_sym.minsym);
+ symname = MSYMBOL_DEMANGLED_NAME (typeinfo_sym.minsym);
if (symname == NULL || strncmp (symname, TYPEINFO_PREFIX,
TYPEINFO_PREFIX_LEN))
error (_("typeinfo symbol '%s' has unexpected name"),
- SYMBOL_LINKAGE_NAME (typeinfo_sym.minsym));
+ MSYMBOL_LINKAGE_NAME (typeinfo_sym.minsym));
class_name = symname + TYPEINFO_PREFIX_LEN;
/* Strip off @plt and version suffixes. */
/* The symbol's demangled name should be something like "virtual
thunk to FUNCTION", where FUNCTION is the name of the function
being thunked to. */
- thunk_name = SYMBOL_DEMANGLED_NAME (thunk_sym);
+ thunk_name = MSYMBOL_DEMANGLED_NAME (thunk_sym);
if (thunk_name == NULL || strstr (thunk_name, " thunk to ") == NULL)
return 0;
if (fn_sym == NULL)
return 0;
- method_stop_pc = SYMBOL_VALUE_ADDRESS (fn_sym);
+ method_stop_pc = MSYMBOL_VALUE_ADDRESS (fn_sym);
/* Some targets have minimal symbols pointing to function descriptors
(powerpc 64 for example). Make sure to retrieve the address
minsym = lookup_minimal_symbol_by_pc (pc);
if (minsym.minsym
- && strcmp (SYMBOL_LINKAGE_NAME (minsym.minsym), ".stub") == 0)
+ && strcmp (MSYMBOL_LINKAGE_NAME (minsym.minsym), ".stub") == 0)
return 1;
/* Get the unwind descriptor corresponding to PC, return zero
if (! minsym.minsym)
return 0;
- sec = SYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym)->the_bfd_section;
+ sec = MSYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym)->the_bfd_section;
if (bfd_get_section_vma (sec->owner, sec) <= pc
&& pc < (bfd_get_section_vma (sec->owner, sec)
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
- && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (msym.minsym)) == 0)
+ && strcmp (MSYMBOL_LINKAGE_NAME (msymbol),
+ MSYMBOL_LINKAGE_NAME (msym.minsym)) == 0)
{
function_found = 1;
break;
return orig_pc == pc ? 0 : pc & ~0x3;
}
- libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym.minsym),
+ libsym = lookup_minimal_symbol (MSYMBOL_LINKAGE_NAME (stubsym.minsym),
NULL, NULL);
if (libsym == NULL)
{
warning (_("Unable to find library symbol for %s."),
- SYMBOL_PRINT_NAME (stubsym.minsym));
+ MSYMBOL_PRINT_NAME (stubsym.minsym));
return orig_pc == pc ? 0 : pc & ~0x3;
}
- return SYMBOL_VALUE (libsym);
+ return MSYMBOL_VALUE (libsym);
}
/* Does it look like bl X,%rp or bl X,%r0? Another way to do a
gdb_byte buf[2 * HPPA_INSN_SIZE];
int offset;
- find_pc_partial_function (SYMBOL_VALUE_ADDRESS (msym), &name,
+ find_pc_partial_function (MSYMBOL_VALUE_ADDRESS (msym), &name,
&begin, &end);
if (name == NULL || begin == 0 || end == 0)
ALL_OBJFILES (objfile)
{
stubsym = lookup_minimal_symbol_solib_trampoline
- (SYMBOL_LINKAGE_NAME (funsym.minsym), objfile);
+ (MSYMBOL_LINKAGE_NAME (funsym.minsym), objfile);
if (stubsym)
{
struct unwind_table_entry *u;
- u = find_unwind_entry (SYMBOL_VALUE (stubsym));
+ u = find_unwind_entry (MSYMBOL_VALUE (stubsym));
if (u == NULL
|| (u->stub_unwind.stub_type != IMPORT
&& u->stub_unwind.stub_type != IMPORT_SHLIB))
continue;
- stubaddr = SYMBOL_VALUE (stubsym);
+ stubaddr = MSYMBOL_VALUE (stubsym);
/* If we found an IMPORT stub, then we can stop searching;
if we found an IMPORT_SHLIB, we want to continue the search
find_pc_partial_function (addr, NULL, &func, NULL);
ALL_OBJFILE_MSYMBOLS (sec->objfile, msym)
{
- u = find_unwind_entry (SYMBOL_VALUE_ADDRESS (msym));
- if (func != SYMBOL_VALUE_ADDRESS (msym)
+ u = find_unwind_entry (MSYMBOL_VALUE_ADDRESS (msym));
+ if (func != MSYMBOL_VALUE_ADDRESS (msym)
&& (!u || u->stub_unwind.stub_type == 0))
- return SYMBOL_VALUE_ADDRESS (msym);
+ return MSYMBOL_VALUE_ADDRESS (msym);
}
}
minsym = lookup_minimal_symbol (sym, NULL, NULL);
if (minsym)
- return SYMBOL_VALUE_ADDRESS (minsym);
+ return MSYMBOL_VALUE_ADDRESS (minsym);
else
return (CORE_ADDR)-1;
}
ALL_MSYMBOLS (objfile, msym)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
+ if (strcmp (MSYMBOL_LINKAGE_NAME (msym), name) == 0)
{
struct unwind_table_entry *u;
- u = find_unwind_entry (SYMBOL_VALUE (msym));
+ u = find_unwind_entry (MSYMBOL_VALUE (msym));
if (u != NULL && u->stub_unwind.stub_type == stub_type)
return msym;
}
call_dest = call_dest & 0xffffffffU;
s = lookup_minimal_symbol_by_pc (call_dest);
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__main") == 0)
pc += 5;
}
}
read_memory_unsigned_integer (pc + 2, 4, byte_order);
struct minimal_symbol *indsym =
indirect ? lookup_minimal_symbol_by_pc (indirect).minsym : 0;
- const char *symname = indsym ? SYMBOL_LINKAGE_NAME (indsym) : 0;
+ const char *symname = indsym ? MSYMBOL_LINKAGE_NAME (indsym) : 0;
if (symname)
{
minsym = lookup_minimal_symbol_by_pc (addr);
- if (minsym.minsym && is_vtable_name (SYMBOL_LINKAGE_NAME (minsym.minsym)))
+ if (minsym.minsym
+ && is_vtable_name (MSYMBOL_LINKAGE_NAME (minsym.minsym)))
return read_memory_unsigned_integer (addr, 8, byte_order);
}
struct bound_minimal_symbol msymbol = lookup_minimal_symbol_by_pc (funaddr);
if (msymbol.minsym)
- return SYMBOL_PRINT_NAME (msymbol.minsym);
+ return MSYMBOL_PRINT_NAME (msymbol.minsym);
}
{
if (msymbol.minsym == NULL)
error (_("Execution is not within a known function."));
- tp->control.step_range_start = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ tp->control.step_range_start = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
tp->control.step_range_end = pc;
}
else
if (jit_debug)
fprintf_unfiltered (gdb_stdlog,
"jit_read_descriptor, descriptor_addr = %s\n",
- paddress (gdbarch, SYMBOL_VALUE_ADDRESS (objf_data->descriptor)));
+ paddress (gdbarch, MSYMBOL_VALUE_ADDRESS (objf_data->descriptor)));
/* Figure out how big the descriptor is on the remote and how to read it. */
ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
desc_buf = alloca (desc_size);
/* Read the descriptor. */
- err = target_read_memory (SYMBOL_VALUE_ADDRESS (objf_data->descriptor),
+ err = target_read_memory (MSYMBOL_VALUE_ADDRESS (objf_data->descriptor),
desc_buf, desc_size);
if (err)
{
assume we are not attached to a JIT. */
reg_symbol = lookup_minimal_symbol_and_objfile (jit_break_name);
if (reg_symbol.minsym == NULL
- || SYMBOL_VALUE_ADDRESS (reg_symbol.minsym) == 0)
+ || MSYMBOL_VALUE_ADDRESS (reg_symbol.minsym) == 0)
return 1;
desc_symbol = lookup_minimal_symbol (jit_descriptor_name, NULL,
reg_symbol.objfile);
- if (desc_symbol == NULL || SYMBOL_VALUE_ADDRESS (desc_symbol) == 0)
+ if (desc_symbol == NULL || MSYMBOL_VALUE_ADDRESS (desc_symbol) == 0)
return 1;
objf_data = get_jit_objfile_data (reg_symbol.objfile);
else
objf_data = get_jit_objfile_data (ps_data->objfile);
- addr = SYMBOL_VALUE_ADDRESS (objf_data->register_code);
+ addr = MSYMBOL_VALUE_ADDRESS (objf_data->register_code);
if (jit_debug)
fprintf_unfiltered (gdb_stdlog,
CORE_ADDR pc;
struct symtab_and_line sal;
- sal = find_pc_sect_line (SYMBOL_VALUE_ADDRESS (msymbol),
+ sal = find_pc_sect_line (MSYMBOL_VALUE_ADDRESS (msymbol),
(struct obj_section *) 0, 0);
- sal.section = SYMBOL_OBJ_SECTION (objfile, msymbol);
+ sal.section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
/* The minimal symbol might point to a function descriptor;
resolve it to the actual code address instead. */
skip_prologue_sal (&sal);
if (maybe_add_address (self->addr_set, objfile->pspace, sal.pc))
- add_sal_to_sals (self, result, &sal, SYMBOL_NATURAL_NAME (msymbol), 0);
+ add_sal_to_sals (self, result, &sal, MSYMBOL_NATURAL_NAME (msymbol), 0);
}
/* A helper struct to pass some data through
before we decide to discard it. */
struct gdbarch *gdbarch = get_objfile_arch (info->objfile);
CORE_ADDR addr = gdbarch_convert_from_func_ptr_addr
- (gdbarch, SYMBOL_VALUE_ADDRESS (minsym),
+ (gdbarch, MSYMBOL_VALUE_ADDRESS (minsym),
¤t_target);
- if (addr == SYMBOL_VALUE_ADDRESS (minsym))
+ if (addr == MSYMBOL_VALUE_ADDRESS (minsym))
return;
}
}
msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym)
- printf_filtered (", <%s>", SYMBOL_LINKAGE_NAME (msym.minsym));
+ printf_filtered (", <%s>", MSYMBOL_LINKAGE_NAME (msym.minsym));
}
putchar_filtered ('\n');
if (ms == NULL)
return 0;
- if (target_read_memory (SYMBOL_VALUE_ADDRESS (ms), (gdb_byte *) &signo,
+ if (target_read_memory (MSYMBOL_VALUE_ADDRESS (ms), (gdb_byte *) &signo,
sizeof (signo)) != 0)
return 0;
if (version_msym == NULL)
return 0;
- version_addr = SYMBOL_VALUE_ADDRESS (version_msym);
+ version_addr = MSYMBOL_VALUE_ADDRESS (version_msym);
got = target_read_string (version_addr, &version, 32, &err);
if (err == 0 && memchr (version, 0, got) == &version[got -1])
{
error (_("The return value is stored in memory at 'mem0', "
"but GDB cannot find\n"
"its address."));
- read_memory (SYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
+ read_memory (MSYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
}
}
error (_("The return value is stored in memory at 'mem0', "
"but GDB cannot find\n"
" its address."));
- write_memory (SYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
+ write_memory (MSYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
}
}
"couldn't find a symbol at that address, to find trampoline."),
paddress (gdbarch, addr));
- func_name = SYMBOL_LINKAGE_NAME (func_msym.minsym);
+ func_name = MSYMBOL_LINKAGE_NAME (func_msym.minsym);
tramp_name = xmalloc (strlen (func_name) + 5);
strcpy (tramp_name, func_name);
strcat (tramp_name, ".plt");
else
{
/* The trampoline's address is our pointer. */
- addr = SYMBOL_VALUE_ADDRESS (tramp_msym);
+ addr = MSYMBOL_VALUE_ADDRESS (tramp_msym);
}
}
if (ptr_msym.minsym)
{
- const char *ptr_msym_name = SYMBOL_LINKAGE_NAME (ptr_msym.minsym);
+ const char *ptr_msym_name = MSYMBOL_LINKAGE_NAME (ptr_msym.minsym);
int len = strlen (ptr_msym_name);
if (len > 4
/* If we do have such a symbol, return its value as the
function's true address. */
if (func_msym)
- ptr = SYMBOL_VALUE_ADDRESS (func_msym);
+ ptr = MSYMBOL_VALUE_ADDRESS (func_msym);
}
}
else
/* Check if the stack is empty. */
msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
- if (msym_stack && info->base == SYMBOL_VALUE_ADDRESS (msym_stack))
+ if (msym_stack && info->base == MSYMBOL_VALUE_ADDRESS (msym_stack))
return;
/* Hopefully the prologue analysis either correctly determined the
msymbol = lookup_minimal_symbol (name, NULL, NULL);
if (msymbol)
{
- reg->addr = SYMBOL_VALUE_ADDRESS (msymbol);
+ reg->addr = MSYMBOL_VALUE_ADDRESS (msymbol);
reg->name = xstrdup (name);
/* Keep track of the address range for soft registers. */
return 0;
}
else
- return SYMBOL_VALUE_ADDRESS (msym);
+ return MSYMBOL_VALUE_ADDRESS (msym);
}
/* Add oso file OSO/ABFD as a symbol file. */
if (sym.minsym)
{
- const char *symbol_name = SYMBOL_PRINT_NAME (sym.minsym);
+ const char *symbol_name = MSYMBOL_PRINT_NAME (sym.minsym);
const char *symbol_offset
- = pulongest (address - SYMBOL_VALUE_ADDRESS (sym.minsym));
+ = pulongest (address - MSYMBOL_VALUE_ADDRESS (sym.minsym));
- sect = SYMBOL_OBJ_SECTION(sym.objfile, sym.minsym);
+ sect = MSYMBOL_OBJ_SECTION(sym.objfile, sym.minsym);
if (sect != NULL)
{
const char *section_name;
if (sym->hash_next == NULL)
{
unsigned int hash
- = msymbol_hash (SYMBOL_LINKAGE_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
+ = msymbol_hash (MSYMBOL_LINKAGE_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
sym->hash_next = table[hash];
table[hash] = sym;
{
if (sym->demangled_hash_next == NULL)
{
- unsigned int hash = msymbol_hash_iw (SYMBOL_SEARCH_NAME (sym))
+ unsigned int hash = msymbol_hash_iw (MSYMBOL_SEARCH_NAME (sym))
% MINIMAL_SYMBOL_HASH_SIZE;
sym->demangled_hash_next = table[hash];
cmp = (case_sensitivity == case_sensitive_on
? strcmp : strcasecmp);
- match = cmp (SYMBOL_LINKAGE_NAME (msymbol),
+ match = cmp (MSYMBOL_LINKAGE_NAME (msymbol),
modified_name) == 0;
}
else
{
/* The function respects CASE_SENSITIVITY. */
- match = SYMBOL_MATCHES_SEARCH_NAME (msymbol,
+ match = MSYMBOL_MATCHES_SEARCH_NAME (msymbol,
modified_name);
}
cmp = (case_sensitivity == case_sensitive_on ? strcmp : strcasecmp);
while (iter)
{
- if (cmp (SYMBOL_LINKAGE_NAME (iter), name) == 0)
+ if (cmp (MSYMBOL_LINKAGE_NAME (iter), name) == 0)
(*callback) (iter, user_data);
iter = iter->hash_next;
}
iter = objf->msymbol_demangled_hash[hash];
while (iter)
{
- if (SYMBOL_MATCHES_SEARCH_NAME (iter, name))
+ if (MSYMBOL_MATCHES_SEARCH_NAME (iter, name))
(*callback) (iter, user_data);
iter = iter->demangled_hash_next;
}
msymbol != NULL && found_symbol == NULL;
msymbol = msymbol->hash_next)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (msymbol), name) == 0 &&
+ if (strcmp (MSYMBOL_LINKAGE_NAME (msymbol), name) == 0 &&
(MSYMBOL_TYPE (msymbol) == mst_text
|| MSYMBOL_TYPE (msymbol) == mst_text_gnu_ifunc
|| MSYMBOL_TYPE (msymbol) == mst_file_text))
msymbol != NULL;
msymbol = msymbol->hash_next)
{
- if (SYMBOL_VALUE_ADDRESS (msymbol) == pc
- && strcmp (SYMBOL_LINKAGE_NAME (msymbol), name) == 0)
+ if (MSYMBOL_VALUE_ADDRESS (msymbol) == pc
+ && strcmp (MSYMBOL_LINKAGE_NAME (msymbol), name) == 0)
return msymbol;
}
}
msymbol != NULL && found_symbol == NULL;
msymbol = msymbol->hash_next)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (msymbol), name) == 0 &&
+ if (strcmp (MSYMBOL_LINKAGE_NAME (msymbol), name) == 0 &&
MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
return msymbol;
}
Warning: this code is trickier than it would appear at first. */
/* Should also require that pc is <= end of objfile. FIXME! */
- if (pc >= SYMBOL_VALUE_ADDRESS (&msymbol[lo]))
+ if (pc >= MSYMBOL_VALUE_ADDRESS (&msymbol[lo]))
{
- while (SYMBOL_VALUE_ADDRESS (&msymbol[hi]) > pc)
+ while (MSYMBOL_VALUE_ADDRESS (&msymbol[hi]) > pc)
{
/* pc is still strictly less than highest address. */
/* Note "new" will always be >= lo. */
new = (lo + hi) / 2;
- if ((SYMBOL_VALUE_ADDRESS (&msymbol[new]) >= pc) ||
+ if ((MSYMBOL_VALUE_ADDRESS (&msymbol[new]) >= pc) ||
(lo == new))
{
hi = new;
hi to point to the last one. That way we can find the
right symbol if it has an index greater than hi. */
while (hi < objfile->minimal_symbol_count - 1
- && (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
- == SYMBOL_VALUE_ADDRESS (&msymbol[hi + 1])))
+ && (MSYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ == MSYMBOL_VALUE_ADDRESS (&msymbol[hi + 1])))
hi++;
/* Skip various undesirable symbols. */
/* Some types of debug info, such as COFF,
don't fill the bfd_section member, so don't
throw away symbols on those platforms. */
- && SYMBOL_OBJ_SECTION (objfile, &msymbol[hi]) != NULL
+ && MSYMBOL_OBJ_SECTION (objfile, &msymbol[hi]) != NULL
&& (!matching_obj_sections
- (SYMBOL_OBJ_SECTION (objfile, &msymbol[hi]),
+ (MSYMBOL_OBJ_SECTION (objfile, &msymbol[hi]),
section)))
{
hi--;
&& MSYMBOL_TYPE (&msymbol[hi - 1]) == want_type
&& (MSYMBOL_SIZE (&msymbol[hi])
== MSYMBOL_SIZE (&msymbol[hi - 1]))
- && (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
- == SYMBOL_VALUE_ADDRESS (&msymbol[hi - 1]))
- && (SYMBOL_OBJ_SECTION (objfile, &msymbol[hi])
- == SYMBOL_OBJ_SECTION (objfile, &msymbol[hi - 1])))
+ && (MSYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ == MSYMBOL_VALUE_ADDRESS (&msymbol[hi - 1]))
+ && (MSYMBOL_OBJ_SECTION (objfile, &msymbol[hi])
+ == MSYMBOL_OBJ_SECTION (objfile, &msymbol[hi - 1])))
{
hi--;
continue;
the cancellable variants, but both have sizes. */
if (hi > 0
&& MSYMBOL_SIZE (&msymbol[hi]) != 0
- && pc >= (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ && pc >= (MSYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ MSYMBOL_SIZE (&msymbol[hi]))
- && pc < (SYMBOL_VALUE_ADDRESS (&msymbol[hi - 1])
+ && pc < (MSYMBOL_VALUE_ADDRESS (&msymbol[hi - 1])
+ MSYMBOL_SIZE (&msymbol[hi - 1])))
{
hi--;
if (hi >= 0
&& MSYMBOL_SIZE (&msymbol[hi]) != 0
- && pc >= (SYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ && pc >= (MSYMBOL_VALUE_ADDRESS (&msymbol[hi])
+ MSYMBOL_SIZE (&msymbol[hi])))
{
if (best_zero_sized != -1)
if (hi >= 0
&& ((best_symbol == NULL) ||
- (SYMBOL_VALUE_ADDRESS (best_symbol) <
- SYMBOL_VALUE_ADDRESS (&msymbol[hi]))))
+ (MSYMBOL_VALUE_ADDRESS (best_symbol) <
+ MSYMBOL_VALUE_ADDRESS (&msymbol[hi]))))
{
best_symbol = &msymbol[hi];
best_objfile = objfile;
msym != NULL;
msym = msym->hash_next)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
+ if (strcmp (MSYMBOL_LINKAGE_NAME (msym), name) == 0)
{
result.minsym = msym;
result.objfile = objfile;
msym_bunch = new;
}
msymbol = &msym_bunch->contents[msym_bunch_index];
- SYMBOL_SET_LANGUAGE (msymbol, language_auto, &objfile->objfile_obstack);
- SYMBOL_SET_NAMES (msymbol, name, name_len, copy_name, objfile);
+ MSYMBOL_SET_LANGUAGE (msymbol, language_auto, &objfile->objfile_obstack);
+ MSYMBOL_SET_NAMES (msymbol, name, name_len, copy_name, objfile);
- SYMBOL_VALUE_ADDRESS (msymbol) = address;
- SYMBOL_SECTION (msymbol) = section;
+ MSYMBOL_VALUE_ADDRESS (msymbol) = address;
+ MSYMBOL_SECTION (msymbol) = section;
MSYMBOL_TYPE (msymbol) = ms_type;
MSYMBOL_TARGET_FLAG_1 (msymbol) = 0;
fn1 = (const struct minimal_symbol *) fn1p;
fn2 = (const struct minimal_symbol *) fn2p;
- if (SYMBOL_VALUE_ADDRESS (fn1) < SYMBOL_VALUE_ADDRESS (fn2))
+ if (MSYMBOL_VALUE_ADDRESS (fn1) < MSYMBOL_VALUE_ADDRESS (fn2))
{
return (-1); /* addr 1 is less than addr 2. */
}
- else if (SYMBOL_VALUE_ADDRESS (fn1) > SYMBOL_VALUE_ADDRESS (fn2))
+ else if (MSYMBOL_VALUE_ADDRESS (fn1) > MSYMBOL_VALUE_ADDRESS (fn2))
{
return (1); /* addr 1 is greater than addr 2. */
}
else
/* addrs are equal: sort by name */
{
- const char *name1 = SYMBOL_LINKAGE_NAME (fn1);
- const char *name2 = SYMBOL_LINKAGE_NAME (fn2);
+ const char *name1 = MSYMBOL_LINKAGE_NAME (fn1);
+ const char *name2 = MSYMBOL_LINKAGE_NAME (fn2);
if (name1 && name2) /* both have names */
return strcmp (name1, name2);
copyfrom = copyto = msymbol;
while (copyfrom < msymbol + mcount - 1)
{
- if (SYMBOL_VALUE_ADDRESS (copyfrom)
- == SYMBOL_VALUE_ADDRESS ((copyfrom + 1))
- && strcmp (SYMBOL_LINKAGE_NAME (copyfrom),
- SYMBOL_LINKAGE_NAME ((copyfrom + 1))) == 0)
+ if (MSYMBOL_VALUE_ADDRESS (copyfrom)
+ == MSYMBOL_VALUE_ADDRESS ((copyfrom + 1))
+ && strcmp (MSYMBOL_LINKAGE_NAME (copyfrom),
+ MSYMBOL_LINKAGE_NAME ((copyfrom + 1))) == 0)
{
if (MSYMBOL_TYPE ((copyfrom + 1)) == mst_unknown)
{
add_minsym_to_hash_table (msym, objfile->msymbol_hash);
msym->demangled_hash_next = 0;
- if (SYMBOL_SEARCH_NAME (msym) != SYMBOL_LINKAGE_NAME (msym))
+ if (MSYMBOL_SEARCH_NAME (msym) != MSYMBOL_LINKAGE_NAME (msym))
add_minsym_to_demangled_hash_table (msym,
objfile->msymbol_demangled_hash);
}
memset (m, 0, sizeof (*m));
/* Don't rely on these enumeration values being 0's. */
MSYMBOL_TYPE (m) = mst_unknown;
- SYMBOL_SET_LANGUAGE (m, language_unknown, &objfile->objfile_obstack);
+ MSYMBOL_SET_LANGUAGE (m, language_unknown, &objfile->objfile_obstack);
}
}
{
if ((MSYMBOL_TYPE (msymbol) == mst_text
|| MSYMBOL_TYPE (msymbol) == mst_text_gnu_ifunc)
- && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
- return SYMBOL_VALUE_ADDRESS (msymbol);
+ && strcmp (MSYMBOL_LINKAGE_NAME (msymbol),
+ MSYMBOL_LINKAGE_NAME (tsymbol)) == 0)
+ return MSYMBOL_VALUE_ADDRESS (msymbol);
/* Also handle minimal symbols pointing to function descriptors. */
if (MSYMBOL_TYPE (msymbol) == mst_data
- && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
+ && strcmp (MSYMBOL_LINKAGE_NAME (msymbol),
+ MSYMBOL_LINKAGE_NAME (tsymbol)) == 0)
{
CORE_ADDR func;
func = gdbarch_convert_from_func_ptr_addr
(get_objfile_arch (objfile),
- SYMBOL_VALUE_ADDRESS (msymbol),
+ MSYMBOL_VALUE_ADDRESS (msymbol),
¤t_target);
/* Ignore data symbols that are not function descriptors. */
- if (func != SYMBOL_VALUE_ADDRESS (msymbol))
+ if (func != MSYMBOL_VALUE_ADDRESS (msymbol))
return func;
}
}
of the section, as the end of the function. */
if (MSYMBOL_SIZE (minsym.minsym) != 0)
- return SYMBOL_VALUE_ADDRESS (minsym.minsym) + MSYMBOL_SIZE (minsym.minsym);
+ return MSYMBOL_VALUE_ADDRESS (minsym.minsym) + MSYMBOL_SIZE (minsym.minsym);
/* Step over other symbols at this same address, and symbols in
other sections, to find the next symbol in this section with a
different address. */
msymbol = minsym.minsym;
- section = SYMBOL_SECTION (msymbol);
- for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
+ section = MSYMBOL_SECTION (msymbol);
+ for (i = 1; MSYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
{
- if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
- && SYMBOL_SECTION (msymbol + i) == section)
+ if (MSYMBOL_VALUE_ADDRESS (msymbol + i) != MSYMBOL_VALUE_ADDRESS (msymbol)
+ && MSYMBOL_SECTION (msymbol + i) == section)
break;
}
- obj_section = SYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym);
- if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
- && SYMBOL_VALUE_ADDRESS (msymbol + i) < obj_section_endaddr (obj_section))
- result = SYMBOL_VALUE_ADDRESS (msymbol + i);
+ obj_section = MSYMBOL_OBJ_SECTION (minsym.objfile, minsym.minsym);
+ if (MSYMBOL_LINKAGE_NAME (msymbol + i) != NULL
+ && (MSYMBOL_VALUE_ADDRESS (msymbol + i)
+ < obj_section_endaddr (obj_section)))
+ result = MSYMBOL_VALUE_ADDRESS (msymbol + i);
else
/* We got the start address from the last msymbol in the objfile.
So the end address is the end of the section. */
resolver = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
- if (resolver && SYMBOL_VALUE_ADDRESS (resolver) == pc)
+ if (resolver && MSYMBOL_VALUE_ADDRESS (resolver) == pc)
return frame_unwind_caller_pc (get_current_frame ());
return glibc_skip_solib_resolver (gdbarch, pc);
stub. The stub for foo is named ".pic.foo". */
msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym != NULL
- && SYMBOL_LINKAGE_NAME (msym.minsym) != NULL
- && strncmp (SYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) == 0)
+ && MSYMBOL_LINKAGE_NAME (msym.minsym) != NULL
+ && strncmp (MSYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) == 0)
return 1;
return 0;
which jumps to foo. */
msym = lookup_minimal_symbol_by_pc (pc);
if (msym.minsym == NULL
- || SYMBOL_VALUE_ADDRESS (msym.minsym) != pc
- || SYMBOL_LINKAGE_NAME (msym.minsym) == NULL
- || strncmp (SYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) != 0)
+ || MSYMBOL_VALUE_ADDRESS (msym.minsym) != pc
+ || MSYMBOL_LINKAGE_NAME (msym.minsym) == NULL
+ || strncmp (MSYMBOL_LINKAGE_NAME (msym.minsym), ".pic.", 5) != 0)
return 0;
/* A two-instruction header. */
if (!bms.minsym)
return pc;
- stub_name = SYMBOL_LINKAGE_NAME (bms.minsym);
+ stub_name = MSYMBOL_LINKAGE_NAME (bms.minsym);
if (gdbarch_tdep (gdbarch)->code_model == MSP_SMALL_CODE_MODEL
&& msp430_in_return_stub (gdbarch, pc, stub_name))
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- name = SYMBOL_NATURAL_NAME (msymbol);
+ name = MSYMBOL_NATURAL_NAME (msymbol);
if (name
&& (name[0] == '-' || name[0] == '+')
&& name[1] == '[') /* Got a method name. */
{
complaint (&symfile_complaints,
_("Bad method name '%s'"),
- SYMBOL_NATURAL_NAME (msymbol));
+ MSYMBOL_NATURAL_NAME (msymbol));
continue;
}
if (regexp == NULL || re_exec(++name) != 0)
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- name = SYMBOL_NATURAL_NAME (msymbol);
+ name = MSYMBOL_NATURAL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- name = SYMBOL_NATURAL_NAME (msymbol);
+ name = MSYMBOL_NATURAL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- name = SYMBOL_NATURAL_NAME (msymbol);
+ name = MSYMBOL_NATURAL_NAME (msymbol);
if (name &&
(name[0] == '-' || name[0] == '+') &&
name[1] == '[') /* Got a method name. */
/* Check the symbol name first as this can be done entirely without
sending any query to the target. */
- symname = SYMBOL_NATURAL_NAME (msymbol);
+ symname = MSYMBOL_NATURAL_NAME (msymbol);
if (symname == NULL)
continue;
if (msym != NULL)
VEC_safe_push (const_char_ptr, *symbol_names,
- SYMBOL_NATURAL_NAME (msym));
+ MSYMBOL_NATURAL_NAME (msym));
}
}
continue;
}
- methcalls[i].begin = SYMBOL_VALUE_ADDRESS (func.minsym);
+ methcalls[i].begin = MSYMBOL_VALUE_ADDRESS (func.minsym);
methcalls[i].end = minimal_symbol_upper_bound (func);
}
}
struct minimal_symbol *msym;
ALL_OBJFILE_MSYMBOLS (objfile, msym)
- if (SYMBOL_SECTION (msym) >= 0)
- SYMBOL_VALUE_ADDRESS (msym) += ANOFFSET (delta, SYMBOL_SECTION (msym));
+ if (MSYMBOL_SECTION (msym) >= 0)
+ MSYMBOL_VALUE_ADDRESS (msym) += ANOFFSET (delta,
+ MSYMBOL_SECTION (msym));
}
/* Relocating different sections by different amounts may cause the symbols
to be out of order. */
/* Traverse all minimal symbols in one objfile. */
#define ALL_OBJFILE_MSYMBOLS(objfile, m) \
- for ((m) = (objfile) -> msymbols; SYMBOL_LINKAGE_NAME(m) != NULL; (m)++)
+ for ((m) = (objfile) -> msymbols; MSYMBOL_LINKAGE_NAME(m) != NULL; (m)++)
/* Traverse all symtabs in all objfiles in the current symbol
space. */
struct minimal_symbol *msym;
msym = lookup_minimal_symbol("_dl_bind", NULL, NULL);
- if (msym && SYMBOL_VALUE_ADDRESS (msym) == pc)
+ if (msym && MSYMBOL_VALUE_ADDRESS (msym) == pc)
return frame_unwind_caller_pc (get_current_frame ());
else
return find_solib_trampoline_target (get_current_frame (), pc);
/* If 'symbol_print' is set, we did the work above. */
if (!options->symbol_print
&& (msymbol.minsym != NULL)
- && (vt_address == SYMBOL_VALUE_ADDRESS (msymbol.minsym)))
+ && (vt_address == MSYMBOL_VALUE_ADDRESS (msymbol.minsym)))
{
if (want_space)
fputs_filtered (" ", stream);
fputs_filtered ("<", stream);
- fputs_filtered (SYMBOL_PRINT_NAME (msymbol.minsym), stream);
+ fputs_filtered (MSYMBOL_PRINT_NAME (msymbol.minsym), stream);
fputs_filtered (">", stream);
want_space = 1;
}
fputs_filtered (" ", stream);
if (msymbol.minsym != NULL)
- wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol.minsym),
+ wsym = lookup_symbol (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
block,
VAR_DOMAIN, &is_this_fld);
struct objfile *objfile = bound_msym.objfile;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- CORE_ADDR addr = SYMBOL_VALUE_ADDRESS (msymbol);
- struct obj_section *section = SYMBOL_OBJ_SECTION (objfile, msymbol);
+ CORE_ADDR addr = MSYMBOL_VALUE_ADDRESS (msymbol);
+ struct obj_section *section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
enum minimal_symbol_type type = MSYMBOL_TYPE (msymbol);
CORE_ADDR pc;
if (ifunc_msym.minsym != NULL
&& MSYMBOL_TYPE (ifunc_msym.minsym) == mst_text_gnu_ifunc
- && SYMBOL_VALUE_ADDRESS (ifunc_msym.minsym) == pc)
+ && MSYMBOL_VALUE_ADDRESS (ifunc_msym.minsym) == pc)
{
/* A function descriptor has been resolved but PC is still in the
STT_GNU_IFUNC resolver body (such as because inferior does not
/* Check if we are in the resolver. */
sym = lookup_minimal_symbol_by_pc (pc);
if (sym.minsym != NULL
- && (strcmp (SYMBOL_LINKAGE_NAME (sym.minsym), "__glink") == 0
- || strcmp (SYMBOL_LINKAGE_NAME (sym.minsym),
+ && (strcmp (MSYMBOL_LINKAGE_NAME (sym.minsym), "__glink") == 0
+ || strcmp (MSYMBOL_LINKAGE_NAME (sym.minsym),
"__glink_PLTresolve") == 0))
return 1;
if (MSYMBOL_TARGET_FLAG_1 (fun.minsym))
local_entry_offset = 8;
- if (SYMBOL_VALUE_ADDRESS (fun.minsym) <= pc
- && pc < SYMBOL_VALUE_ADDRESS (fun.minsym) + local_entry_offset)
- return SYMBOL_VALUE_ADDRESS (fun.minsym) + local_entry_offset;
+ if (MSYMBOL_VALUE_ADDRESS (fun.minsym) <= pc
+ && pc < MSYMBOL_VALUE_ADDRESS (fun.minsym) + local_entry_offset)
+ return MSYMBOL_VALUE_ADDRESS (fun.minsym) + local_entry_offset;
return pc;
}
{
spe_context_objfile = objfile;
spe_context_lm_addr = svr4_fetch_objfile_link_map (objfile);
- spe_context_offset = SYMBOL_VALUE_ADDRESS (sym);
+ spe_context_offset = MSYMBOL_VALUE_ADDRESS (sym);
spe_context_cache_ptid = minus_one_ptid;
spe_context_cache_address = 0;
return;
/* 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);
- if (dot_fn.minsym == NULL || SYMBOL_LINKAGE_NAME (dot_fn.minsym)[0] != '.')
+ if (dot_fn.minsym == NULL || MSYMBOL_LINKAGE_NAME (dot_fn.minsym)[0] != '.')
return 0;
/* Get the section that contains CODE_ADDR. Need this for the
"objfile" that it contains. */
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 (SYMBOL_LINKAGE_NAME (dot_fn.minsym) + 1, NULL,
+ fn = lookup_minimal_symbol (MSYMBOL_LINKAGE_NAME (dot_fn.minsym) + 1, NULL,
dot_fn_section->objfile);
if (fn == NULL)
return 0;
/* Found a descriptor. */
- (*desc_addr) = SYMBOL_VALUE_ADDRESS (fn);
+ (*desc_addr) = MSYMBOL_VALUE_ADDRESS (fn);
return 1;
}
if (msymbol != NULL)
{
- if (SYMBOL_VALUE_ADDRESS (msymbol) > name_location || symbol == NULL)
+ if (MSYMBOL_VALUE_ADDRESS (msymbol) > name_location || symbol == NULL)
{
/* If this is a function (i.e. a code address), strip out any
non-address bits. For instance, display a pointer to the
/* The msymbol is closer to the address than the symbol;
use the msymbol instead. */
symbol = 0;
- name_location = SYMBOL_VALUE_ADDRESS (msymbol);
+ name_location = MSYMBOL_VALUE_ADDRESS (msymbol);
if (do_demangle || asm_demangle)
- name_temp = SYMBOL_PRINT_NAME (msymbol);
+ name_temp = MSYMBOL_PRINT_NAME (msymbol);
else
- name_temp = SYMBOL_LINKAGE_NAME (msymbol);
+ name_temp = MSYMBOL_LINKAGE_NAME (msymbol);
}
}
if (symbol == NULL && msymbol == NULL)
struct cleanup *old_chain;
matches = 1;
- offset = sect_addr - SYMBOL_VALUE_ADDRESS (msymbol);
+ offset = sect_addr - MSYMBOL_VALUE_ADDRESS (msymbol);
mapped = section_is_mapped (osect) ? _("mapped") : _("unmapped");
sec_name = osect->the_bfd_section->name;
- msym_name = SYMBOL_PRINT_NAME (msymbol);
+ msym_name = MSYMBOL_PRINT_NAME (msymbol);
/* Don't print the offset if it is zero.
We assume there's no need to handle i18n of "sym + offset". */
struct objfile *objfile = msymbol.objfile;
gdbarch = get_objfile_arch (objfile);
- load_addr = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ load_addr = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
printf_filtered ("Symbol \"");
fprintf_symbol_filtered (gdb_stdout, exp,
printf_filtered ("\" is at ");
fputs_filtered (paddress (gdbarch, load_addr), gdb_stdout);
printf_filtered (" in a file compiled without debugging");
- section = SYMBOL_OBJ_SECTION (objfile, msymbol.minsym);
+ section = MSYMBOL_OBJ_SECTION (objfile, msymbol.minsym);
if (section_is_overlay (section))
{
load_addr = overlay_unmapped_address (load_addr, section);
printf_filtered ("unresolved");
else
{
- section = SYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
- load_addr = SYMBOL_VALUE_ADDRESS (msym.minsym);
+ section = MSYMBOL_OBJ_SECTION (msym.objfile, msym.minsym);
+ load_addr = MSYMBOL_VALUE_ADDRESS (msym.minsym);
if (section
&& (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
result = PS_NOSYM;
else
{
- *sym_addr = core_addr_to_ps_addr (SYMBOL_VALUE_ADDRESS (ms));
+ *sym_addr = core_addr_to_ps_addr (MSYMBOL_VALUE_ADDRESS (ms));
result = PS_OK;
}
p = find_pc_sect_psymbol (objfile, tpst, pc, section);
if (p != NULL
&& SYMBOL_VALUE_ADDRESS (p)
- == SYMBOL_VALUE_ADDRESS (msymbol))
+ == MSYMBOL_VALUE_ADDRESS (msymbol))
return tpst;
/* Also accept the textlow value of a psymtab as a
p = find_pc_sect_psymbol (objfile, pst, pc, section);
if (!p
|| SYMBOL_VALUE_ADDRESS (p)
- != SYMBOL_VALUE_ADDRESS (msymbol))
+ != MSYMBOL_VALUE_ADDRESS (msymbol))
goto next;
}
msymbol = lookup_minimal_symbol_by_pc (addr);
if (msymbol.minsym != NULL)
- function = SYMBOL_PRINT_NAME (msymbol.minsym);
+ function = MSYMBOL_PRINT_NAME (msymbol.minsym);
}
else if (py_func != Py_None)
{
if (!object_msym)
return 0;
- object_addr = SYMBOL_VALUE_ADDRESS (object_msym);
+ object_addr = MSYMBOL_VALUE_ADDRESS (object_msym);
object_size = TYPE_LENGTH (builtin_type_void_data_ptr);
buf_size = object_size;
buf = alloca (buf_size);
if (sym != NULL)
return SYMBOL_PRINT_NAME (sym);
else if (msym != NULL)
- return SYMBOL_PRINT_NAME (msym);
+ return MSYMBOL_PRINT_NAME (msym);
else
return "??";
}
if (sym != NULL)
ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (sym));
else if (msym != NULL)
- ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (msym));
+ ui_out_field_string (uiout, "function", MSYMBOL_PRINT_NAME (msym));
else if (!ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "function", "??");
else
{
int addr_size = gdbarch_addr_bit (target_gdbarch ()) / 8;
- CORE_ADDR sym_addr = SYMBOL_VALUE_ADDRESS (sym);
+ CORE_ADDR sym_addr = MSYMBOL_VALUE_ADDRESS (sym);
/* If this is a function address, return the start of code
instead of any data function descriptor. */
to __eabi in case the GCC option "-fleading-underscore" was
used to compile the program. */
if (s.minsym != NULL
- && SYMBOL_LINKAGE_NAME (s.minsym) != NULL
- && (strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "__eabi") == 0
- || strcmp (SYMBOL_LINKAGE_NAME (s.minsym), "___eabi") == 0))
+ && MSYMBOL_LINKAGE_NAME (s.minsym) != NULL
+ && (strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "__eabi") == 0
+ || strcmp (MSYMBOL_LINKAGE_NAME (s.minsym), "___eabi") == 0))
pc += 4;
}
return pc;
msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym
&& rs6000_in_solib_return_trampoline (gdbarch, pc,
- SYMBOL_LINKAGE_NAME (msymbol.minsym)))
+ MSYMBOL_LINKAGE_NAME (msymbol.minsym)))
{
/* Double-check that the third instruction from PC is relative "b". */
op = read_memory_integer (pc + 8, 4, byte_order);
if (((elf_symbol_type *)(sym))->internal_elf_sym.st_other == STO_SH5_ISA32)
{
MSYMBOL_TARGET_FLAG_1 (msym) = 1;
- SYMBOL_VALUE_ADDRESS (msym) |= 1;
+ MSYMBOL_VALUE_ADDRESS (msym) |= 1;
}
}
struct minimal_symbol *msym;
msym = lookup_minimal_symbol("elf_bndr", NULL, NULL);
- if (msym && SYMBOL_VALUE_ADDRESS (msym) == pc)
+ if (msym && MSYMBOL_VALUE_ADDRESS (msym) == pc)
return frame_unwind_caller_pc (get_current_frame ());
return 0;
if (got_sym != 0)
{
- addr = SYMBOL_VALUE_ADDRESS (got_sym);
+ addr = MSYMBOL_VALUE_ADDRESS (got_sym);
if (solib_dsbt_debug)
fprintf_unfiltered (gdb_stdlog,
"lm_base: get addr %x by _GLOBAL_OFFSET_TABLE_.\n",
return 0;
}
- addr = SYMBOL_VALUE_ADDRESS (got_sym) + 8;
+ addr = MSYMBOL_VALUE_ADDRESS (got_sym) + 8;
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
if (got_sym == 0)
return 0;
- return SYMBOL_VALUE_ADDRESS (got_sym);
+ return MSYMBOL_VALUE_ADDRESS (got_sym);
}
/* Find the global pointer for the given function address ADDR. */
CORE_ADDR address = 0;
msymbol = lookup_minimal_symbol (DEBUG_BASE, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+ if ((msymbol != NULL) && (MSYMBOL_VALUE_ADDRESS (msymbol) != 0))
{
- address = SYMBOL_VALUE_ADDRESS (msymbol);
+ address = MSYMBOL_VALUE_ADDRESS (msymbol);
}
return (address);
}
if (msymbol == NULL)
goto keep_going;
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ anaddr = MSYMBOL_VALUE_ADDRESS (msymbol);
store_unsigned_integer (buf, 4, byte_order, ptid_get_pid (inferior_ptid));
status = target_write_memory (anaddr, buf, 4);
if (status != 0)
GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ anaddr = MSYMBOL_VALUE_ADDRESS (msymbol);
dld_cache.hook.address = anaddr;
/* Grrr, this might not be an export symbol! We have to find the
export stub. */
- msymbol = hppa_lookup_stub_minimal_symbol (SYMBOL_LINKAGE_NAME (msymbol),
+ msymbol = hppa_lookup_stub_minimal_symbol (MSYMBOL_LINKAGE_NAME (msymbol),
EXPORT);
if (msymbol != NULL)
{
- anaddr = SYMBOL_VALUE (msymbol);
+ anaddr = MSYMBOL_VALUE (msymbol);
dld_cache.hook_stub.address = anaddr;
}
store_unsigned_integer (buf, 4, byte_order, anaddr);
GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ anaddr = MSYMBOL_VALUE_ADDRESS (msymbol);
status = target_write_memory (anaddr, buf, 4);
/* Now set a shlib_event breakpoint at __d_trap so we can track
goto keep_going;
}
create_solib_event_breakpoint (target_gdbarch (),
- SYMBOL_VALUE_ADDRESS (msymbol));
+ MSYMBOL_VALUE_ADDRESS (msymbol));
/* We have all the support usually found in end.o, so we can track
shl_load and shl_unload calls. */
error (_("Unable to find __dld_flags symbol in object file."));
}
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ anaddr = MSYMBOL_VALUE_ADDRESS (msymbol);
/* Read the current contents. */
status = target_read_memory (anaddr, buf, 4);
if (msymbol == NULL)
error (_("Unable to find _start symbol in object file."));
- anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
+ anaddr = MSYMBOL_VALUE_ADDRESS (msymbol);
/* Make the breakpoint at "_start" a shared library event breakpoint. */
create_solib_event_breakpoint (target_gdbarch (), anaddr);
dld_msymbol = lookup_minimal_symbol ("shl_load", NULL, objfile);
if (dld_msymbol != NULL)
{
- dld_cache.load.address = SYMBOL_VALUE (dld_msymbol);
+ dld_cache.load.address = MSYMBOL_VALUE (dld_msymbol);
dld_cache.load.unwind = find_unwind_entry (dld_cache.load.address);
}
{
if (MSYMBOL_TYPE (dld_msymbol) == mst_solib_trampoline)
{
- u = find_unwind_entry (SYMBOL_VALUE (dld_msymbol));
+ u = find_unwind_entry (MSYMBOL_VALUE (dld_msymbol));
if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
{
- dld_cache.load_stub.address = SYMBOL_VALUE (dld_msymbol);
+ dld_cache.load_stub.address = MSYMBOL_VALUE (dld_msymbol);
dld_cache.load_stub.unwind = u;
}
}
dld_msymbol = lookup_minimal_symbol ("shl_unload", NULL, objfile);
if (dld_msymbol != NULL)
{
- dld_cache.unload.address = SYMBOL_VALUE (dld_msymbol);
+ dld_cache.unload.address = MSYMBOL_VALUE (dld_msymbol);
dld_cache.unload.unwind = find_unwind_entry (dld_cache.unload.address);
/* ??rehrauer: I'm not sure exactly what this is, but it appears
{
if (MSYMBOL_TYPE (dld_msymbol) == mst_solib_trampoline)
{
- u = find_unwind_entry (SYMBOL_VALUE (dld_msymbol));
+ u = find_unwind_entry (MSYMBOL_VALUE (dld_msymbol));
if ((u != NULL) && (u->stub_unwind.stub_type == EXPORT))
{
- dld_cache.unload_stub.address = SYMBOL_VALUE (dld_msymbol);
+ dld_cache.unload_stub.address = MSYMBOL_VALUE (dld_msymbol);
dld_cache.unload_stub.unwind = u;
}
}
sym = lookup_minimal_symbol ("__dld_flags", NULL, NULL);
if (!sym)
error (_("Unable to find __dld_flags symbol in object file."));
- addr = SYMBOL_VALUE_ADDRESS (sym);
+ addr = MSYMBOL_VALUE_ADDRESS (sym);
read_memory (addr, buf, 4);
dld_flags = extract_unsigned_integer (buf, 4, byte_order);
if ((dld_flags & DLD_FLAGS_LISTVALID) == 0)
error (_("Unable to find dynamic library list."));
return 0;
}
- addr = SYMBOL_VALUE_ADDRESS (sym) - 8;
+ addr = MSYMBOL_VALUE_ADDRESS (sym) - 8;
}
else
- addr = SYMBOL_VALUE_ADDRESS (sym);
+ addr = MSYMBOL_VALUE_ADDRESS (sym);
read_memory (addr, buf, 4);
addr = extract_unsigned_integer (buf, 4, byte_order);
/* Place a solib_event breakpoint on the symbol. */
if (spe_event_sym)
{
- CORE_ADDR addr = SYMBOL_VALUE_ADDRESS (spe_event_sym);
+ CORE_ADDR addr = MSYMBOL_VALUE_ADDRESS (spe_event_sym);
addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), addr,
¤t_target);
if (event_sym && addr_sym)
{
/* Place a solib_event breakpoint on the symbol. */
- CORE_ADDR event_addr = SYMBOL_VALUE_ADDRESS (event_sym);
+ CORE_ADDR event_addr = MSYMBOL_VALUE_ADDRESS (event_sym);
create_solib_event_breakpoint (get_objfile_arch (objfile), event_addr);
/* Store the address of the symbol that will point to OpenCL program
&objfile->objfile_obstack,
objfile->sections_end - objfile->sections,
CORE_ADDR);
- *ocl_program_addr_base = SYMBOL_VALUE_ADDRESS (addr_sym);
+ *ocl_program_addr_base = MSYMBOL_VALUE_ADDRESS (addr_sym);
set_objfile_data (objfile, ocl_program_data_key,
ocl_program_addr_base);
}
conventionally named _r_debug, as a last resort. */
msymbol = lookup_minimal_symbol ("_r_debug", NULL, symfile_objfile);
if (msymbol != NULL)
- return SYMBOL_VALUE_ADDRESS (msymbol);
+ return MSYMBOL_VALUE_ADDRESS (msymbol);
/* DT_DEBUG entry not found. */
return 0;
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+ if ((msymbol != NULL) && (MSYMBOL_VALUE_ADDRESS (msymbol) != 0))
{
- sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
+ sym_addr = MSYMBOL_VALUE_ADDRESS (msymbol);
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
sym_addr,
¤t_target);
for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
{
msymbol = lookup_minimal_symbol (*bkpt_namep, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+ if ((msymbol != NULL) && (MSYMBOL_VALUE_ADDRESS (msymbol) != 0))
{
- sym_addr = SYMBOL_VALUE_ADDRESS (msymbol);
+ sym_addr = MSYMBOL_VALUE_ADDRESS (msymbol);
sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (),
sym_addr,
¤t_target);
if (!ovly_buf_table_msym)
return NULL;
- ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym);
+ ovly_table_base = MSYMBOL_VALUE_ADDRESS (ovly_table_msym);
ovly_table_size = MSYMBOL_SIZE (ovly_table_msym);
- ovly_buf_table_base = SYMBOL_VALUE_ADDRESS (ovly_buf_table_msym);
+ ovly_buf_table_base = MSYMBOL_VALUE_ADDRESS (ovly_buf_table_msym);
ovly_buf_table_size = MSYMBOL_SIZE (ovly_buf_table_msym);
ovly_table = xmalloc (ovly_table_size);
/* If we have debugging information, try to use it -- this
will allow us to properly skip the prologue. */
- pc = SYMBOL_VALUE_ADDRESS (minsym);
- symtab = find_pc_sect_symtab (pc, SYMBOL_OBJ_SECTION (objfile, minsym));
+ pc = MSYMBOL_VALUE_ADDRESS (minsym);
+ symtab = find_pc_sect_symtab (pc, MSYMBOL_OBJ_SECTION (objfile, minsym));
if (symtab != NULL)
{
struct blockvector *bv = BLOCKVECTOR (symtab);
type = objfile_type (obj)->builtin_void;
type = lookup_function_type (type);
type = lookup_pointer_type (type);
- addr = SYMBOL_VALUE_ADDRESS (msymbol);
+ addr = MSYMBOL_VALUE_ADDRESS (msymbol);
call_function_by_hand (value_from_pointer (type, addr), 0, NULL);
}
(gdbarch, SYMBOL_LINKAGE_NAME (sym));
SYMBOL_SET_LINKAGE_NAME (sym, new_name);
- SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
+ SYMBOL_VALUE_ADDRESS (sym) = MSYMBOL_VALUE_ADDRESS (msym);
}
}
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
(gdbarch, SYMBOL_LINKAGE_NAME (sym));
SYMBOL_SET_LINKAGE_NAME (sym, new_name);
- SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
+ SYMBOL_VALUE_ADDRESS (sym) = MSYMBOL_VALUE_ADDRESS (msym);
}
}
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
/* Get the hash index and check all the symbols
under that hash index. */
- hash = hashname (SYMBOL_LINKAGE_NAME (msymbol));
+ hash = hashname (MSYMBOL_LINKAGE_NAME (msymbol));
for (sym = global_sym_chain[hash]; sym;)
{
- if (strcmp (SYMBOL_LINKAGE_NAME (msymbol),
+ if (strcmp (MSYMBOL_LINKAGE_NAME (msymbol),
SYMBOL_LINKAGE_NAME (sym)) == 0)
{
/* Splice this symbol out of the hash chain and
if (SYMBOL_CLASS (sym) == LOC_BLOCK)
{
fix_common_block (sym,
- SYMBOL_VALUE_ADDRESS (msymbol));
+ MSYMBOL_VALUE_ADDRESS (msymbol));
}
else
{
SYMBOL_VALUE_ADDRESS (sym)
- = SYMBOL_VALUE_ADDRESS (msymbol);
+ = MSYMBOL_VALUE_ADDRESS (msymbol);
}
- SYMBOL_SECTION (sym) = SYMBOL_SECTION (msymbol);
+ SYMBOL_SECTION (sym) = MSYMBOL_SECTION (msymbol);
}
if (prev)
memset (&msymbol, 0, sizeof (msymbol));
if (msymbol.minsym != NULL
- && (SYMBOL_VALUE_ADDRESS (msymbol.minsym)
+ && (MSYMBOL_VALUE_ADDRESS (msymbol.minsym)
> BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
{
/* We also don't know anything about the function besides
its address and name. */
func = 0;
- *funname = xstrdup (SYMBOL_PRINT_NAME (msymbol.minsym));
- *funlang = SYMBOL_LANGUAGE (msymbol.minsym);
+ *funname = xstrdup (MSYMBOL_PRINT_NAME (msymbol.minsym));
+ *funlang = MSYMBOL_LANGUAGE (msymbol.minsym);
}
else
{
msymbol = lookup_minimal_symbol_by_pc (pc);
if (msymbol.minsym != NULL)
{
- *funname = xstrdup (SYMBOL_PRINT_NAME (msymbol.minsym));
- *funlang = SYMBOL_LANGUAGE (msymbol.minsym);
+ *funname = xstrdup (MSYMBOL_PRINT_NAME (msymbol.minsym));
+ *funlang = MSYMBOL_LANGUAGE (msymbol.minsym);
}
}
}
msymbol = lookup_minimal_symbol_by_pc (frame_pc);
if (msymbol.minsym != NULL)
{
- funname = SYMBOL_PRINT_NAME (msymbol.minsym);
- funlang = SYMBOL_LANGUAGE (msymbol.minsym);
+ funname = MSYMBOL_PRINT_NAME (msymbol.minsym);
+ funlang = MSYMBOL_LANGUAGE (msymbol.minsym);
}
}
calling_frame_info = get_prev_frame (fi);
word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
byte_order = gdbarch_byte_order (gdbarch);
- cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym),
+ cache_novlys = read_memory_integer (MSYMBOL_VALUE_ADDRESS (novlys_msym),
4, byte_order);
cache_ovly_table
= (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table));
- cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym.minsym);
+ cache_ovly_table_base = MSYMBOL_VALUE_ADDRESS (ovly_table_msym.minsym);
read_target_long_array (cache_ovly_table_base,
(unsigned int *) cache_ovly_table,
cache_novlys * 4, word_size, byte_order);
"find `_ovly_table' array\n"
"in inferior. Use `overlay manual' mode."));
- if (cache_ovly_table_base == SYMBOL_VALUE_ADDRESS (minsym))
+ if (cache_ovly_table_base == MSYMBOL_VALUE_ADDRESS (minsym))
/* Then go ahead and try to look up this single section in
the cache. */
if (simple_overlay_update_1 (osect))
index = 0;
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
{
- struct obj_section *section = SYMBOL_OBJ_SECTION (objfile, msymbol);
+ struct obj_section *section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
switch (MSYMBOL_TYPE (msymbol))
{
break;
}
fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
- fputs_filtered (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (msymbol)),
+ fputs_filtered (paddress (gdbarch, MSYMBOL_VALUE_ADDRESS (msymbol)),
outfile);
- fprintf_filtered (outfile, " %s", SYMBOL_LINKAGE_NAME (msymbol));
+ fprintf_filtered (outfile, " %s", MSYMBOL_LINKAGE_NAME (msymbol));
if (section)
{
if (section->the_bfd_section != NULL)
fprintf_filtered (outfile, " spurious section %ld",
(long) (section - objfile->sections));
}
- if (SYMBOL_DEMANGLED_NAME (msymbol) != NULL)
+ if (MSYMBOL_DEMANGLED_NAME (msymbol) != NULL)
{
- fprintf_filtered (outfile, " %s", SYMBOL_DEMANGLED_NAME (msymbol));
+ fprintf_filtered (outfile, " %s", MSYMBOL_DEMANGLED_NAME (msymbol));
}
if (msymbol->filename)
fprintf_filtered (outfile, " %s", msymbol->filename);
point to the actual function code. */
msym = lookup_minimal_symbol_by_pc_name (addr, ginfo->name, objfile);
if (msym)
- ginfo->section = SYMBOL_SECTION (msym);
+ ginfo->section = MSYMBOL_SECTION (msym);
else
{
/* Static, function-local variables do appear in the linker
if (MSYMBOL_TYPE (msymbol.minsym) == mst_solib_trampoline)
{
mfunsym
- = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol.minsym),
+ = lookup_minimal_symbol_text (MSYMBOL_LINKAGE_NAME (msymbol.minsym),
NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
SYMBOL_LINKAGE_NAME (msymbol)); */
;
/* fall through */
- else if (SYMBOL_VALUE_ADDRESS (mfunsym)
- == SYMBOL_VALUE_ADDRESS (msymbol.minsym))
+ else if (MSYMBOL_VALUE_ADDRESS (mfunsym)
+ == MSYMBOL_VALUE_ADDRESS (msymbol.minsym))
/* Avoid infinite recursion */
/* See above comment about why warning is commented out. */
/* warning ("In stub for %s; unable to find real function/line info",
;
/* fall through */
else
- return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
+ return find_pc_line (MSYMBOL_VALUE_ADDRESS (mfunsym), 0);
}
}
objfile = msymbol.objfile;
- pc = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
- section = SYMBOL_OBJ_SECTION (objfile, msymbol.minsym);
- name = SYMBOL_LINKAGE_NAME (msymbol.minsym);
+ pc = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ section = MSYMBOL_OBJ_SECTION (objfile, msymbol.minsym);
+ name = MSYMBOL_LINKAGE_NAME (msymbol.minsym);
}
gdbarch = get_objfile_arch (objfile);
|| MSYMBOL_TYPE (msymbol) == ourtype4)
{
if (!datum.preg_p
- || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
+ || regexec (&datum.preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
NULL, 0) == 0)
{
/* Note: An important side-effect of these lookup functions
is to expand the symbol table if msymbol is found, for the
benefit of the next loop on ALL_PRIMARY_SYMTABS. */
if (kind == FUNCTIONS_DOMAIN
- ? find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)) == NULL
+ ? find_pc_symtab (MSYMBOL_VALUE_ADDRESS (msymbol)) == NULL
: (lookup_symbol_in_objfile_from_linkage_name
- (objfile, SYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
+ (objfile, MSYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
== NULL))
found_misc = 1;
}
|| MSYMBOL_TYPE (msymbol) == ourtype4)
{
if (!datum.preg_p
- || regexec (&datum.preg, SYMBOL_NATURAL_NAME (msymbol), 0,
+ || regexec (&datum.preg, MSYMBOL_NATURAL_NAME (msymbol), 0,
NULL, 0) == 0)
{
/* For functions we can do a quick check of whether the
symbol might be found via find_pc_symtab. */
if (kind != FUNCTIONS_DOMAIN
- || find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)) == NULL)
+ || find_pc_symtab (MSYMBOL_VALUE_ADDRESS (msymbol)) == NULL)
{
if (lookup_symbol_in_objfile_from_linkage_name
- (objfile, SYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
+ (objfile, MSYMBOL_LINKAGE_NAME (msymbol), VAR_DOMAIN)
== NULL)
{
/* match */
char *tmp;
if (gdbarch_addr_bit (gdbarch) <= 32)
- tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol.minsym)
+ tmp = hex_string_custom (MSYMBOL_VALUE_ADDRESS (msymbol.minsym)
& (CORE_ADDR) 0xffffffff,
8);
else
- tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol.minsym),
+ tmp = hex_string_custom (MSYMBOL_VALUE_ADDRESS (msymbol.minsym),
16);
printf_filtered ("%s %s\n",
- tmp, SYMBOL_PRINT_NAME (msymbol.minsym));
+ tmp, MSYMBOL_PRINT_NAME (msymbol.minsym));
}
/* This is the guts of the commands "info functions", "info types", and
}
else
{
- int newlen = (strlen (SYMBOL_LINKAGE_NAME (p->msymbol.minsym)) + 3);
+ int newlen = (strlen (MSYMBOL_LINKAGE_NAME (p->msymbol.minsym)) + 3);
if (newlen > len)
{
len = newlen;
}
strcpy (string, "'");
- strcat (string, SYMBOL_LINKAGE_NAME (p->msymbol.minsym));
+ strcat (string, MSYMBOL_LINKAGE_NAME (p->msymbol.minsym));
strcat (string, "'");
break_command (string, from_tty);
printf_filtered ("<function, no debug info> %s;\n",
- SYMBOL_PRINT_NAME (p->msymbol.minsym));
+ MSYMBOL_PRINT_NAME (p->msymbol.minsym));
}
}
completion_list_add_name \
(SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word))
+#define MCOMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \
+ completion_list_add_name \
+ (MSYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word))
+
/* Test to see if the symbol specified by SYMNAME (which is already
demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
characters. If so, add it to the current completion list. */
const char *method, *category, *selector;
char *tmp2 = NULL;
- method = SYMBOL_NATURAL_NAME (msymbol);
+ method = MSYMBOL_NATURAL_NAME (msymbol);
/* Is it a method? */
if ((method[0] != '-') && (method[0] != '+'))
ALL_MSYMBOLS (objfile, msymbol)
{
QUIT;
- COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text,
- word);
+ MCOMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text,
+ word);
completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text,
word);
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
/* Note that all the following SYMBOL_* macros are used with the
- SYMBOL argument being either a partial symbol, a minimal symbol or
- a full symbol. All three types have a ginfo field. In particular
+ SYMBOL argument being either a partial symbol or
+ a full symbol. Both types have a ginfo field. In particular
the SYMBOL_SET_LANGUAGE, SYMBOL_DEMANGLED_NAME, etc.
macros cannot be entirely substituted by
functions, unless the callers are changed to pass in the ginfo
The SYMBOL_VALUE_ADDRESS contains the address that this symbol
corresponds to. */
- struct general_symbol_info ginfo;
+ struct general_symbol_info mginfo;
/* Size of this symbol. end_psymtab in dbxread.c uses this
information to calculate the end of the partial symtab based on the
#define MSYMBOL_HAS_SIZE(msymbol) ((msymbol)->has_size + 0)
#define MSYMBOL_TYPE(msymbol) (msymbol)->type
+#define MSYMBOL_VALUE(symbol) (symbol)->mginfo.value.ivalue
+#define MSYMBOL_VALUE_ADDRESS(symbol) (symbol)->mginfo.value.address
+#define MSYMBOL_VALUE_BYTES(symbol) (symbol)->mginfo.value.bytes
+#define MSYMBOL_BLOCK_VALUE(symbol) (symbol)->mginfo.value.block
+#define MSYMBOL_VALUE_CHAIN(symbol) (symbol)->mginfo.value.chain
+#define MSYMBOL_LANGUAGE(symbol) (symbol)->mginfo.language
+#define MSYMBOL_SECTION(symbol) (symbol)->mginfo.section
+#define MSYMBOL_OBJ_SECTION(objfile, symbol) \
+ (((symbol)->mginfo.section >= 0) \
+ ? (&(((objfile)->sections)[(symbol)->mginfo.section])) \
+ : NULL)
+
+#define MSYMBOL_NATURAL_NAME(symbol) \
+ (symbol_natural_name (&(symbol)->mginfo))
+#define MSYMBOL_LINKAGE_NAME(symbol) (symbol)->mginfo.name
+#define MSYMBOL_PRINT_NAME(symbol) \
+ (demangle ? MSYMBOL_NATURAL_NAME (symbol) : MSYMBOL_LINKAGE_NAME (symbol))
+#define MSYMBOL_DEMANGLED_NAME(symbol) \
+ (symbol_demangled_name (&(symbol)->mginfo))
+#define MSYMBOL_SET_LANGUAGE(symbol,language,obstack) \
+ (symbol_set_language (&(symbol)->mginfo, (language), (obstack)))
+#define MSYMBOL_SEARCH_NAME(symbol) \
+ (symbol_search_name (&(symbol)->mginfo))
+#define MSYMBOL_MATCHES_SEARCH_NAME(symbol, name) \
+ (strcmp_iw (MSYMBOL_SEARCH_NAME (symbol), (name)) == 0)
+#define MSYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile) \
+ symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, objfile)
+
#include "minsyms.h"
\f
printf_filtered ("static storage at address ");
printf_filtered ("%s",
paddress (gdbarch,
- SYMBOL_VALUE_ADDRESS (msym)));
+ MSYMBOL_VALUE_ADDRESS (msym)));
}
break;
case LOC_OPTIMIZED_OUT:
msymbol = lookup_minimal_symbol_by_pc_section (new_low, 0).minsym;
if (msymbol)
- new_low = SYMBOL_VALUE_ADDRESS (msymbol);
+ new_low = MSYMBOL_VALUE_ADDRESS (msymbol);
else
new_low += 1 * max_lines;
if (main_symbol == 0)
main_symbol = lookup_minimal_symbol ("_start", NULL, NULL);
if (main_symbol)
- addr = SYMBOL_VALUE_ADDRESS (main_symbol);
+ addr = MSYMBOL_VALUE_ADDRESS (main_symbol);
else
addr = 0;
}
type = lookup_pointer_type (builtin_type (gdbarch)->builtin_char);
type = lookup_function_type (type);
type = lookup_pointer_type (type);
- maddr = SYMBOL_VALUE_ADDRESS (msymbol.minsym);
+ maddr = MSYMBOL_VALUE_ADDRESS (msymbol.minsym);
if (objf_p)
*objf_p = objfile;
else
{
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
- SYMBOL_VALUE_ADDRESS (msym));
+ MSYMBOL_VALUE_ADDRESS (msym));
}
}
else
set_value_address (v,
gdbarch_convert_from_func_ptr_addr
- (gdbarch, SYMBOL_VALUE_ADDRESS (msym.minsym), ¤t_target));
+ (gdbarch, MSYMBOL_VALUE_ADDRESS (msym.minsym), ¤t_target));
}
if (arg1p)