aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-linux-nat.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-03-29 16:58:23 +0000
committerDaniel Jacobowitz <drow@false.org>2005-03-29 16:58:23 +0000
commitadb8a87cfdda1ecdf85565e467f3662401b2315a (patch)
tree9a48e60644396b0202e48a4b6af64c9ae9fc1d5f /gdb/arm-linux-nat.c
parent498b1f8763c6df04348266deefaa688eee6d4862 (diff)
downloadfsf-binutils-gdb-adb8a87cfdda1ecdf85565e467f3662401b2315a.zip
fsf-binutils-gdb-adb8a87cfdda1ecdf85565e467f3662401b2315a.tar.gz
fsf-binutils-gdb-adb8a87cfdda1ecdf85565e467f3662401b2315a.tar.bz2
* arm-linux-nat.c (store_register, store_regs): Handle
ARM_PS_REGNUM.
Diffstat (limited to 'gdb/arm-linux-nat.c')
-rw-r--r--gdb/arm-linux-nat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index b5311f4..8059af6 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -492,6 +492,12 @@ store_register (int regno)
if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
regcache_raw_collect (current_regcache, regno, (char *) &regs[regno]);
+ else if (arm_apcs_32 && regno == ARM_PS_REGNUM)
+ regcache_raw_collect (current_regcache, regno,
+ (char *) &regs[ARM_CPSR_REGNUM]);
+ else if (!arm_apcs_32 && regno == ARM_PS_REGNUM)
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) &regs[ARM_PC_REGNUM]);
ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
if (ret < 0)
@@ -524,6 +530,10 @@ store_regs (void)
regcache_raw_collect (current_regcache, regno, (char *) &regs[regno]);
}
+ if (arm_apcs_32 && register_cached (ARM_PS_REGNUM))
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) &regs[ARM_CPSR_REGNUM]);
+
ret = ptrace (PTRACE_SETREGS, tid, 0, &regs);
if (ret < 0)