diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:42:22 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-30 21:42:22 +0000 |
commit | b2cb219a9d9b9e689c14ff470f09d04228808870 (patch) | |
tree | a051e5dc103dfd20850a06fc96aa9ff723672342 /gdb | |
parent | a6f7e8387ec523b3c0eedef713e02d8f68aa68cb (diff) | |
download | gdb-b2cb219a9d9b9e689c14ff470f09d04228808870.zip gdb-b2cb219a9d9b9e689c14ff470f09d04228808870.tar.gz gdb-b2cb219a9d9b9e689c14ff470f09d04228808870.tar.bz2 |
2007-10-30 Markus Deuling <deuling@de.ibm.com>
* armnbsd-nat.c (arm_supply_gregset, fetch_register, store_register)
(store_regs): 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/armnbsd-nat.c | 21 |
2 files changed, 17 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 455fd99..54510e4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2007-10-30 Markus Deuling <deuling@de.ibm.com> + * armnbsd-nat.c (arm_supply_gregset, fetch_register, store_register) + (store_regs): Use get_regcache_arch to get at the current architecture + by regcache. + +2007-10-30 Markus Deuling <deuling@de.ibm.com> + * arm-linux-tdep.c (arm_linux_supply_gregset): Use get_regcache_arch to get at the current architecture by regcache. diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c index 6fb7b47..7d992e8 100644 --- a/gdb/armnbsd-nat.c +++ b/gdb/armnbsd-nat.c @@ -50,7 +50,7 @@ arm_supply_gregset (struct regcache *regcache, struct reg *gregset) regcache_raw_supply (regcache, ARM_LR_REGNUM, (char *) &gregset->r_lr); /* This is ok: we're running native... */ - r_pc = gdbarch_addr_bits_remove (current_gdbarch, gregset->r_pc); + r_pc = gdbarch_addr_bits_remove (get_regcache_arch (regcache), gregset->r_pc); regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &r_pc); if (arm_apcs_32) @@ -104,7 +104,8 @@ fetch_register (struct regcache *regcache, int regno) case ARM_PC_REGNUM: /* This is ok: we're running native... */ inferior_registers.r_pc = gdbarch_addr_bits_remove - (current_gdbarch, inferior_registers.r_pc); + (get_regcache_arch (regcache), + inferior_registers.r_pc); regcache_raw_supply (regcache, ARM_PC_REGNUM, (char *) &inferior_registers.r_pc); break; @@ -213,6 +214,7 @@ armnbsd_fetch_registers (struct regcache *regcache, int regno) static void store_register (const struct regcache *regcache, int regno) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); struct reg inferior_registers; int ret; @@ -248,10 +250,9 @@ store_register (const struct regcache *regcache, int regno) regcache_raw_collect (regcache, ARM_PC_REGNUM, (char *) &pc_val); - pc_val = gdbarch_addr_bits_remove (current_gdbarch, pc_val); + pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val); inferior_registers.r_pc ^= gdbarch_addr_bits_remove - (current_gdbarch, - inferior_registers.r_pc); + (gdbarch, inferior_registers.r_pc); inferior_registers.r_pc |= pc_val; } break; @@ -267,10 +268,9 @@ store_register (const struct regcache *regcache, int regno) regcache_raw_collect (regcache, ARM_PS_REGNUM, (char *) &psr_val); - psr_val ^= gdbarch_addr_bits_remove (current_gdbarch, psr_val); + psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val); inferior_registers.r_pc = gdbarch_addr_bits_remove - (current_gdbarch, - inferior_registers.r_pc); + (gdbarch, inferior_registers.r_pc); inferior_registers.r_pc |= psr_val; } break; @@ -291,6 +291,7 @@ store_register (const struct regcache *regcache, int regno) static void store_regs (const struct regcache *regcache) { + struct gdbarch *gdbarch = get_regcache_arch (regcache); struct reg inferior_registers; int ret; int regno; @@ -322,8 +323,8 @@ store_regs (const struct regcache *regcache) regcache_raw_collect (regcache, ARM_PS_REGNUM, (char *) &psr_val); - pc_val = gdbarch_addr_bits_remove (current_gdbarch, pc_val); - psr_val ^= gdbarch_addr_bits_remove (current_gdbarch, psr_val); + pc_val = gdbarch_addr_bits_remove (gdbarch, pc_val); + psr_val ^= gdbarch_addr_bits_remove (gdbarch, psr_val); inferior_registers.r_pc = pc_val | psr_val; } |