summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debugger/debug_stub.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index eb03b1c..ec6b149 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -404,13 +404,16 @@ cCommHandleDebug:
mov r1, #CPSR_MODE /* Thumb mode can't handle immediate Operands for AND */
and r0, r1 /* Check Current Mode */
cmp r0, #MODE_ABT /* Debug Mode Check (Flags set) */
- pop {r0-r3} /* restore all values */
/* If we're in ABT (Abort) mode, this means that we're already running the Debugger */
beq _in_debug
/* Else, we're in normal operation mode (SVC), or other mode (??!) and need to force a switch to Debug mode */
+ pop {r0-r3} /* restore all values */
dbg__bkpt_thumb
+ b _cont_cCommHandleDebug
_in_debug:
+ pop {r0-r3} /* restore all values */
+_cont_cCommHandleDebug:
mov r0, #0 /* FIXME: Return Status */
bx lr
#endif