aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-aarch32-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/linux-aarch32-low.c')
-rw-r--r--gdb/gdbserver/linux-aarch32-low.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index e6971d5..463bce6 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -62,11 +62,15 @@ arm_fill_gregset (struct regcache *regcache, void *buf)
{
int i;
uint32_t *regs = (uint32_t *) buf;
+ uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
collect_register (regcache, i, &regs[i]);
collect_register (regcache, ARM_PS_REGNUM, &regs[ARM_CPSR_GREGNUM]);
+ /* Keep reserved bits bit 20 to bit 23. */
+ regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
+ | (cpsr & 0x00f00000));
}
/* Supply GP registers contents, stored in BUF, to REGCACHE. */