summaryrefslogtreecommitdiff
path: root/Debugger/debug_stub.S
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-06-13 08:53:18 +0800
committerTat-Chee Wan (USM)2011-06-13 08:53:18 +0800
commitf5e933a0d0912f25dc342a4f658f3910d34aef24 (patch)
treee8c22ab4fe0f1619db9efb6effd498b6fbeefbbb /Debugger/debug_stub.S
parent1846d7661b7c8c0eeeee4f8de837f5e5d158043d (diff)
disable interrupts when switching from undef handler to debugger
NxOS has nested interrupts support. Prevent accidental retriggering of UNDEF handler while processing an existing breakpoint by disabling interrupts until the breakpoint has been restored and the debugger is really ready to handle debug messages.
Diffstat (limited to 'Debugger/debug_stub.S')
-rw-r--r--Debugger/debug_stub.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index d374cbe..aaf1c85 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -720,6 +720,8 @@ dbg__bkpt_offset_outofrange:
dbg__bkpt_waitCMD:
/* We enter this code section when a Breakpoint Triggers */
_dbg_setmode TRUE /* Debug Mode = True */
+ msr cpsr_c, #(MODE_ABT) /* Re-enable Interrupts */
+
_dbg_getstate r0
cmp r0, #DBG_CONFIGURED
blo dbg__bkpt_waitCMD_cont /* Not configured yet, don't send Breakpoint Signal Response */