From adb8a87cfdda1ecdf85565e467f3662401b2315a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 29 Mar 2005 16:58:23 +0000 Subject: [PATCH] * arm-linux-nat.c (store_register, store_regs): Handle ARM_PS_REGNUM. --- gdb/ChangeLog | 5 +++++ gdb/arm-linux-nat.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e0a34a33683..75b86ac7da6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2005-03-29 Daniel Jacobowitz + + * arm-linux-nat.c (store_register, store_regs): Handle + ARM_PS_REGNUM. + 2005-03-29 Daniel Jacobowitz * arm-linux-tdep.c (arm_linux_thumb_be_breakpoint) diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index b5311f4c2c0..8059af6c052 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 *) ®s[regno]); + else if (arm_apcs_32 && regno == ARM_PS_REGNUM) + regcache_raw_collect (current_regcache, regno, + (char *) ®s[ARM_CPSR_REGNUM]); + else if (!arm_apcs_32 && regno == ARM_PS_REGNUM) + regcache_raw_collect (current_regcache, ARM_PC_REGNUM, + (char *) ®s[ARM_PC_REGNUM]); ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); if (ret < 0) @@ -524,6 +530,10 @@ store_regs (void) regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]); } + if (arm_apcs_32 && register_cached (ARM_PS_REGNUM)) + regcache_raw_collect (current_regcache, ARM_PS_REGNUM, + (char *) ®s[ARM_CPSR_REGNUM]); + ret = ptrace (PTRACE_SETREGS, tid, 0, ®s); if (ret < 0) -- 2.30.2