diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:50:56 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-08 12:50:56 +0000 |
commit | 464963c92cc07668165c0e503994b41cde3daa4b (patch) | |
tree | c0ca0d91497447cff4919e9eb982ee2d6bf8e5c4 /gdb/hppa-hpux-tdep.c | |
parent | 7fbe2eba67086bb413f4187d3dedc8fb3457ac3e (diff) | |
download | gdb-464963c92cc07668165c0e503994b41cde3daa4b.zip gdb-464963c92cc07668165c0e503994b41cde3daa4b.tar.gz gdb-464963c92cc07668165c0e503994b41cde3daa4b.tar.bz2 |
2007-10-08 Markus Deuling <deuling@de.ibm.com>
* hppa-tdep.c (hppa_stub_unwind_sniffer, hppa_dump_tdep): Replace
current_gdbarch by gdbarch.
* hppa-linux-nat.c (fetch_register, store_register)
(hppa_linux_fetch_inferior_registers)
(hppa_linux_store_inferior_registers): Use get_regcache_arch or
get_frame_arch to get at the current architecture by regcache or by
frame, respectively.
* hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code
(hppa_hpux_unwind_adjust_stub): Likewise.
* hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register)
(hppa_hpux_fetch_inferior_registers)
(hppa_hpux_store_inferior_registers): Likewise.
Diffstat (limited to 'gdb/hppa-hpux-tdep.c')
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index e7188e5..cf1c1d1 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -299,6 +299,7 @@ hppa_hpux_in_solib_return_trampoline (CORE_ADDR pc, char *name) static CORE_ADDR hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) { + struct gdbarch *gdbarch = get_frame_arch (frame); long orig_pc = pc; long prev_inst, curr_inst, loc; struct minimal_symbol *msym; @@ -315,13 +316,13 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) itself. Bit 31 has meaning too, but only for MPE. */ if (pc & 0x2) pc = (CORE_ADDR) read_memory_integer - (pc & ~0x3, gdbarch_ptr_bit (current_gdbarch) / 8); + (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8); } if (pc == hppa_symbol_address("$$dyncall_external")) { pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22); pc = (CORE_ADDR) read_memory_integer - (pc & ~0x3, gdbarch_ptr_bit (current_gdbarch) / 8); + (pc & ~0x3, gdbarch_ptr_bit (gdbarch) / 8); } else if (pc == hppa_symbol_address("_sr4export")) pc = (CORE_ADDR) get_frame_register_unsigned (frame, 22); @@ -517,7 +518,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) { return (read_memory_integer (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24, - gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3; + gdbarch_ptr_bit (gdbarch) / 8)) & ~0x3; } /* What about be,n 0(sr0,%rp)? It's just another way we return to @@ -530,7 +531,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) mtsp %r1,%sr0 if we want to do sanity checking. */ return (read_memory_integer (get_frame_register_unsigned (frame, HPPA_SP_REGNUM) - 24, - gdbarch_ptr_bit (current_gdbarch) / 8)) & ~0x3; + gdbarch_ptr_bit (gdbarch) / 8)) & ~0x3; } /* Haven't found the branch yet, but we're still in the stub. @@ -1422,6 +1423,7 @@ static void hppa_hpux_unwind_adjust_stub (struct frame_info *next_frame, CORE_ADDR base, struct trad_frame_saved_reg *saved_regs) { + struct gdbarch *gdbarch = get_frame_arch (next_frame); int optimized, realreg; enum lval_type lval; CORE_ADDR addr; @@ -1441,14 +1443,14 @@ hppa_hpux_unwind_adjust_stub (struct frame_info *next_frame, CORE_ADDR base, if (u && u->stub_unwind.stub_type == EXPORT) { stubpc = read_memory_integer - (base - 24, gdbarch_ptr_bit (current_gdbarch) / 8); + (base - 24, gdbarch_ptr_bit (gdbarch) / 8); trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc); } else if (hppa_symbol_address ("__gcc_plt_call") == get_pc_function_start (val)) { stubpc = read_memory_integer - (base - 8, gdbarch_ptr_bit (current_gdbarch) / 8); + (base - 8, gdbarch_ptr_bit (gdbarch) / 8); trad_frame_set_value (saved_regs, HPPA_PCOQ_HEAD_REGNUM, stubpc); } } |