summaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:59:08 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:59:08 +0000
commit6aa27e60ba114f43a954ecbdce9d453820bb0c3b (patch)
treed166881d898a41b2349c36e4764c54dbc112bb4f /gdb/symtab.c
parentfcb4486c32cb089362753f42c4e69ddb2aeee705 (diff)
downloadgdb-6aa27e60ba114f43a954ecbdce9d453820bb0c3b.tar.gz
* minsyms.h (struct bound_minimal_symbol): New.
(lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove objfile argument. (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. * minsyms.c (lookup_minimal_symbol_by_pc_1) (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. (in_gnu_ifunc_stub): Update. (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove 'objfile_p' argument. (lookup_solib_trampoline_symbol_by_pc): Update. * ada-tasks.c, amd64-windows-tdep.c, arm-tdep.c, arm-wince-tdep.c, block.c, blockframe.c, breakpoint.c, btrace.c, c-valprint.c, dwarf2loc.c, elfread.c, frame.c, frv-tdep.c, glibc-tdep.c, gnu-v2-abi.c, gnu-v3-abi.c, hppa-hpux-tdep.c, i386-tdep.c, ia64-tdep.c, infcall.c, infcmd.c, jit.c, linux-fork.c, m32c-tdep.c, m68hc11-tdep.c, maint.c, mips-tdep.c, p-valprint.c, parse.c, ppc-linux-tdep.c, ppc-sysv-tdep.c, printcmd.c, rs6000-tdep.c, sh64-tdep.c, stack.c, symtab.c, tui/tui-disasm.c: Update.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 8ef3966fc16..1922d9bf539 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -979,7 +979,7 @@ find_pc_sect_symtab_via_partial (CORE_ADDR pc, struct obj_section *section)
/* If we know that this is not a text address, return failure. This is
necessary because we loop based on texthigh and textlow, which do
not include the data ranges. */
- msymbol = lookup_minimal_symbol_by_pc_section (pc, section);
+ msymbol = lookup_minimal_symbol_by_pc_section (pc, section).minsym;
if (msymbol
&& (MSYMBOL_TYPE (msymbol) == mst_data
|| MSYMBOL_TYPE (msymbol) == mst_bss
@@ -2071,7 +2071,7 @@ find_pc_sect_symtab (CORE_ADDR pc, struct obj_section *section)
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);
+ msymbol = lookup_minimal_symbol_by_pc_section (pc, section).minsym;
if (msymbol
&& (MSYMBOL_TYPE (msymbol) == mst_data
|| MSYMBOL_TYPE (msymbol) == mst_bss
@@ -2202,7 +2202,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
struct linetable_entry *item;
struct symtab_and_line val;
struct blockvector *bv;
- struct minimal_symbol *msymbol;
+ struct bound_minimal_symbol msymbol;
struct minimal_symbol *mfunsym;
struct objfile *objfile;
@@ -2288,11 +2288,12 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
* infinite recursion.
*/
msymbol = lookup_minimal_symbol_by_pc (pc);
- if (msymbol != NULL)
- if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
+ if (msymbol.minsym != NULL)
+ if (MSYMBOL_TYPE (msymbol.minsym) == mst_solib_trampoline)
{
- mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol),
- NULL);
+ mfunsym
+ = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol.minsym),
+ NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
* in the following situation:
@@ -2308,7 +2309,7 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
;
/* fall through */
else if (SYMBOL_VALUE_ADDRESS (mfunsym)
- == SYMBOL_VALUE_ADDRESS (msymbol))
+ == SYMBOL_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",
@@ -2821,7 +2822,7 @@ skip_prologue_sal (struct symtab_and_line *sal)
else
{
struct minimal_symbol *msymbol
- = lookup_minimal_symbol_by_pc_section (sal->pc, sal->section);
+ = lookup_minimal_symbol_by_pc_section (sal->pc, sal->section).minsym;
if (msymbol == NULL)
{
@@ -2877,8 +2878,8 @@ skip_prologue_sal (struct symtab_and_line *sal)
if (skip && start_sal.pc != pc
&& (sym ? (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= start_sal.end
&& start_sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym)))
- : (lookup_minimal_symbol_by_pc_section (start_sal.end, section)
- == lookup_minimal_symbol_by_pc_section (pc, section))))
+ : (lookup_minimal_symbol_by_pc_section (start_sal.end, section).minsym
+ == lookup_minimal_symbol_by_pc_section (pc, section).minsym)))
{
/* First pc of next line */
pc = start_sal.end;