summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-18 17:03:29 +0800
committerTat-Chee Wan (USM)2011-03-18 17:03:29 +0800
commit6cfc6ae6394d24a03be2ccb6654f0722ca3cea7c (patch)
treed9ac6d85318d6f1c4ec5a1f32f16f80fc579809f
parentaeb10ef6d678a4f574aa2c9c540782879bd2f6ce (diff)
status flags ares not consisent after pop
-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