diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:57:04 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:57:04 +0000 |
commit | 8d90747a2d91f82f8ed34558d36fa6994cb56fb5 (patch) | |
tree | 21a602e849bcd2813a96f8288b53120399f5efdd /gdb | |
parent | 65c5db89dd47744d6dced68e621cd05fc1c4ad93 (diff) | |
download | gdb-8d90747a2d91f82f8ed34558d36fa6994cb56fb5.zip gdb-8d90747a2d91f82f8ed34558d36fa6994cb56fb5.tar.gz gdb-8d90747a2d91f82f8ed34558d36fa6994cb56fb5.tar.bz2 |
2007-10-30 Markus Deuling <deuling@de.ibm.com>
* hpux-thread.c (hpux_thread_fetch_registers)
(hpux_thread_store_registers): Use get_regcache_arch to get at the
current architecture by regcache.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/hpux-thread.c | 19 |
2 files changed, 17 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bbd0d08..1509684 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2007-10-30 Markus Deuling <deuling@de.ibm.com> + * hpux-thread.c (hpux_thread_fetch_registers) + (hpux_thread_store_registers): Use get_regcache_arch to get at the + current architecture by regcache. + +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. diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 3100ddf..7cb385d 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -250,6 +250,7 @@ static char regmap[] = static void hpux_thread_fetch_registers (struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); cma__t_int_tcb tcb, *tcb_ptr; struct cleanup *old_chain; int i; @@ -273,7 +274,7 @@ hpux_thread_fetch_registers (struct regcache *regcache, int regno) if (regno == -1) { first_regno = 0; - last_regno = gdbarch_num_regs (current_gdbarch) - 1; + last_regno = gdbarch_num_regs (gdbarch) - 1; } else { @@ -294,13 +295,14 @@ hpux_thread_fetch_registers (struct regcache *regcache, int regno) if (regno == HPPA_FLAGS_REGNUM) /* Flags must be 0 to avoid bogus value for SS_INSYSCALL */ - memset (buf, '\000', register_size (current_gdbarch, regno)); + memset (buf, '\000', register_size (gdbarch, regno)); else if (regno == HPPA_SP_REGNUM) store_unsigned_integer (buf, sizeof sp, sp); else if (regno == HPPA_PCOQ_HEAD_REGNUM) - read_memory (sp - 20, buf, register_size (current_gdbarch, regno)); + read_memory (sp - 20, buf, register_size (gdbarch, regno)); else - read_memory (sp + regmap[regno], buf, register_size (current_gdbarch, regno)); + read_memory (sp + regmap[regno], buf, + register_size (gdbarch, regno)); regcache_raw_supply (regcache, regno, buf); } @@ -312,6 +314,7 @@ hpux_thread_fetch_registers (struct regcache *regcache, int regno) static void hpux_thread_store_registers (struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); cma__t_int_tcb tcb, *tcb_ptr; struct cleanup *old_chain; int i; @@ -335,7 +338,7 @@ hpux_thread_store_registers (struct regcache *regcache, int regno) if (regno == -1) { first_regno = 0; - last_regno = gdbarch_num_regs (current_gdbarch) - 1; + last_regno = gdbarch_num_regs (gdbarch) - 1; } else { @@ -360,7 +363,7 @@ hpux_thread_store_registers (struct regcache *regcache, int regno) { regcache_raw_collect (regcache, regno, buf); write_memory ((CORE_ADDR) &tcb_ptr->static_ctx.sp, buf, - register_size (current_gdbarch, regno)); + register_size (gdbarch, regno)); tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *) ((CORE_ADDR) buf + 160); } @@ -368,13 +371,13 @@ hpux_thread_store_registers (struct regcache *regcache, int regno) { regcache_raw_collect (regcache, regno, buf); write_memory (sp - 20, buf, - register_size (current_gdbarch, regno)); + register_size (gdbarch, regno)); } else { regcache_raw_collect (regcache, regno, buf); write_memory (sp + regmap[regno], buf, - register_size (current_gdbarch, regno)); + register_size (gdbarch, regno)); } } } |