diff options
author | Chris Johns <chrisj@rtems.org> | 2017-04-14 17:12:44 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-04-15 08:18:25 +1000 |
commit | b53ad4615a16f65119e40f7084f9bacd88dc42cd (patch) | |
tree | d1f56f04b019b77aef1a150f0ab3e32870027e9c /cpukit/libdebugger/rtems-debugger-arm.c | |
parent | m68k/mrm332/./sci.c: Use inttypes.h constants removes 6 warnings. (diff) | |
download | rtems-b53ad4615a16f65119e40f7084f9bacd88dc42cd.tar.bz2 |
libdebugger: Work around assert when using _Thread_Executing.
Using _Thread_Executing with RTEMS_DEBUG results in an `assert` if
the server accesses invalid memory.
Updates #2993.
Diffstat (limited to 'cpukit/libdebugger/rtems-debugger-arm.c')
-rw-r--r-- | cpukit/libdebugger/rtems-debugger-arm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/libdebugger/rtems-debugger-arm.c b/cpukit/libdebugger/rtems-debugger-arm.c index 8126c1471e..200d758a6b 100644 --- a/cpukit/libdebugger/rtems-debugger-arm.c +++ b/cpukit/libdebugger/rtems-debugger-arm.c @@ -717,7 +717,8 @@ target_exception(CPU_Exception_frame* frame) "mov r3, #0\n" \ "str r3, [r2]\n" /* clear the FPU frame pointer */ \ EXCEPTION_ENTRY_FPU(frame_fpu_size) \ - "msr cpsr, r1\n" /* restore the irq mask */ \ + "bic r1, r1, %[psr_i]\n" /* clear irq mask, debug checks */ \ + "msr cpsr, r1\n" /* restore the state with irq mask clear */ \ ASM_THUMB_MODE \ : ARM_SWITCH_REG_ASM, \ [o_frame] "=r" (_frame) \ |