diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:56:12 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:56:12 +0000 |
commit | 65c5db89dd47744d6dced68e621cd05fc1c4ad93 (patch) | |
tree | ee3c4b28c54d082ca4e1ab12767e0d37f7653e2c /gdb | |
parent | 7067c689774e8337600d73759f4d6f1861bb7b83 (diff) | |
download | gdb-65c5db89dd47744d6dced68e621cd05fc1c4ad93.zip gdb-65c5db89dd47744d6dced68e621cd05fc1c4ad93.tar.gz gdb-65c5db89dd47744d6dced68e621cd05fc1c4ad93.tar.bz2 |
2007-10-30 Markus Deuling <deuling@de.ibm.com>
* hppa-tdep.c (hppa_frame_cache): Use get_frame_arch to get at the
current architecture by frame_info.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 14ead8b..bbd0d08 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2007-10-30 Markus Deuling <deuling@de.ibm.com> + * hppa-tdep.c (hppa_frame_cache): Use get_frame_arch to get at the + current architecture by frame_info. + +2007-10-30 Markus Deuling <deuling@de.ibm.com> + * go32-nat.c (fetch_register, go32_fetch_registers, store_register) (go32_store_registers): Use get_regcache_arch to get at the current architecture by regcache. diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 5c0da34..a245198 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1809,6 +1809,7 @@ struct hppa_frame_cache static struct hppa_frame_cache * hppa_frame_cache (struct frame_info *next_frame, void **this_cache) { + struct gdbarch *gdbarch = get_frame_arch (next_frame); struct hppa_frame_cache *cache; long saved_gr_mask; long saved_fr_mask; @@ -2102,7 +2103,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache) saved. The entry SP value is saved at this frame's SP address. */ cache->base = read_memory_integer - (this_sp, gdbarch_ptr_bit (current_gdbarch) / 8); + (this_sp, gdbarch_ptr_bit (gdbarch) / 8); if (hppa_debug) fprintf_unfiltered (gdb_stdlog, " (base=0x%s) [saved]", @@ -2181,7 +2182,7 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache) { /* Convert all the offsets into addresses. */ int reg; - for (reg = 0; reg < gdbarch_num_regs (current_gdbarch); reg++) + for (reg = 0; reg < gdbarch_num_regs (gdbarch); reg++) { if (trad_frame_addr_p (cache->saved_regs, reg)) cache->saved_regs[reg].addr += cache->base; @@ -2189,10 +2190,8 @@ hppa_frame_cache (struct frame_info *next_frame, void **this_cache) } { - struct gdbarch *gdbarch; struct gdbarch_tdep *tdep; - gdbarch = get_frame_arch (next_frame); tdep = gdbarch_tdep (gdbarch); if (tdep->unwind_adjust_stub) |