diff options
Diffstat (limited to 'gdb/hppa-hpux-tdep.c')
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 37 |
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) { |