diff options
Diffstat (limited to 'gdb/aarch32-linux-nat.c')
-rw-r--r-- | gdb/aarch32-linux-nat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/aarch32-linux-nat.c b/gdb/aarch32-linux-nat.c index 568dfa6..72bf644 100644 --- a/gdb/aarch32-linux-nat.c +++ b/gdb/aarch32-linux-nat.c @@ -37,7 +37,11 @@ aarch32_gp_regcache_supply (struct regcache *regcache, uint32_t *regs, regcache_raw_supply (regcache, regno, ®s[regno]); if (arm_apcs_32) - regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); + { + /* Clear reserved bits bit 20 to bit 23. */ + regs[ARM_CPSR_GREGNUM] &= 0xff0fffff; + regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); + } else regcache_raw_supply (regcache, ARM_PS_REGNUM, ®s[ARM_PC_REGNUM]); |