aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-hpux-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 19:59:09 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 19:59:09 +0000
commit7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5 (patch)
treef43a0ccccead27184646d90998d0054410abd6e3 /gdb/hppa-hpux-tdep.c
parentf85f34ede85d0c306e689736c6694caa2f0a0f78 (diff)
downloadgdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.zip
gdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.tar.gz
gdb-7cbd4a934e9cf3808e1199c62e65b4c25b24b4e5.tar.bz2
* 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/hppa-hpux-tdep.c')
-rw-r--r--gdb/hppa-hpux-tdep.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 9948e9b..ad9b4fa 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -89,7 +89,7 @@ hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
CORE_ADDR pc, char *name)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct minimal_symbol *minsym;
+ struct bound_minimal_symbol minsym;
struct unwind_table_entry *u;
/* First see if PC is in one of the two C-library trampolines. */
@@ -98,7 +98,8 @@ hppa32_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
return 1;
minsym = lookup_minimal_symbol_by_pc (pc);
- if (minsym && strcmp (SYMBOL_LINKAGE_NAME (minsym), ".stub") == 0)
+ if (minsym.minsym
+ && strcmp (SYMBOL_LINKAGE_NAME (minsym.minsym), ".stub") == 0)
return 1;
/* Get the unwind descriptor corresponding to PC, return zero
@@ -174,16 +175,16 @@ hppa64_hpux_in_solib_call_trampoline (struct gdbarch *gdbarch,
step. If it does, then assume we are not in a stub and return.
Finally peek at the instructions to see if they look like a stub. */
- struct minimal_symbol *minsym;
+ struct bound_minimal_symbol minsym;
asection *sec;
CORE_ADDR addr;
int insn;
minsym = lookup_minimal_symbol_by_pc (pc);
- if (! minsym)
+ if (! minsym.minsym)
return 0;
- sec = SYMBOL_OBJ_SECTION (minsym)->the_bfd_section;
+ sec = SYMBOL_OBJ_SECTION (minsym.minsym)->the_bfd_section;
if (bfd_get_section_vma (sec->owner, sec) <= pc
&& pc < (bfd_get_section_vma (sec->owner, sec)
@@ -311,7 +312,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
long orig_pc = pc;
long prev_inst, curr_inst, loc;
- struct minimal_symbol *msym;
+ struct bound_minimal_symbol msym;
struct unwind_table_entry *u;
/* Addresses passed to dyncall may *NOT* be the actual address
@@ -366,10 +367,12 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
/*--------------------------------------------------------------------------*/
msym = lookup_minimal_symbol_by_pc (pc);
- if (msym == NULL || MSYMBOL_TYPE (msym) != mst_solib_trampoline)
+ if (msym.minsym == NULL
+ || MSYMBOL_TYPE (msym.minsym) != mst_solib_trampoline)
return orig_pc == pc ? 0 : pc & ~0x3;
- else if (msym != NULL && MSYMBOL_TYPE (msym) == mst_solib_trampoline)
+ else if (msym.minsym != NULL
+ && MSYMBOL_TYPE (msym.minsym) == mst_solib_trampoline)
{
struct objfile *objfile;
struct minimal_symbol *msymbol;
@@ -384,7 +387,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
&& strcmp (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (msym)) == 0)
+ SYMBOL_LINKAGE_NAME (msym.minsym)) == 0)
{
function_found = 1;
break;
@@ -401,7 +404,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
should be mst_text. So we need to fix the msym, and also
get out of this function. */
{
- MSYMBOL_TYPE (msym) = mst_text;
+ MSYMBOL_TYPE (msym.minsym) = mst_text;
return orig_pc == pc ? 0 : pc & ~0x3;
}
}
@@ -472,21 +475,22 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
(curr_inst == 0xeaa0d000) ||
(curr_inst == 0xeaa0d002))
{
- struct minimal_symbol *stubsym, *libsym;
+ struct bound_minimal_symbol stubsym;
+ struct minimal_symbol *libsym;
stubsym = lookup_minimal_symbol_by_pc (loc);
- if (stubsym == NULL)
+ if (stubsym.minsym == NULL)
{
warning (_("Unable to find symbol for 0x%lx"), loc);
return orig_pc == pc ? 0 : pc & ~0x3;
}
- libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym),
+ libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym.minsym),
NULL, NULL);
if (libsym == NULL)
{
warning (_("Unable to find library symbol for %s."),
- SYMBOL_PRINT_NAME (stubsym));
+ SYMBOL_PRINT_NAME (stubsym.minsym));
return orig_pc == pc ? 0 : pc & ~0x3;
}
@@ -1025,7 +1029,8 @@ static CORE_ADDR
hppa_hpux_find_import_stub_for_addr (CORE_ADDR funcaddr)
{
struct objfile *objfile;
- struct minimal_symbol *funsym, *stubsym;
+ struct bound_minimal_symbol funsym;
+ struct minimal_symbol *stubsym;
CORE_ADDR stubaddr;
funsym = lookup_minimal_symbol_by_pc (funcaddr);
@@ -1034,7 +1039,7 @@ hppa_hpux_find_import_stub_for_addr (CORE_ADDR funcaddr)
ALL_OBJFILES (objfile)
{
stubsym = lookup_minimal_symbol_solib_trampoline
- (SYMBOL_LINKAGE_NAME (funsym), objfile);
+ (SYMBOL_LINKAGE_NAME (funsym.minsym), objfile);
if (stubsym)
{