aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/arm-linux-nat.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e0a34a3..75b86ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
+ * arm-linux-nat.c (store_register, store_regs): Handle
+ ARM_PS_REGNUM.
+
+2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
+
* arm-linux-tdep.c (arm_linux_thumb_be_breakpoint)
(arm_linux_thumb_le_breakpoint): New. Update comments.
(arm_linux_init_abi): Set Thumb breakpoints also.
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)