summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-21 09:56:22 +0800
committerTat-Chee Wan (USM)2011-03-21 09:56:22 +0800
commitcae1c995e11a57c7f3c9e15023131488e02918b7 (patch)
treed97bfc0dbdacc2c1ac624eb1b64a65a5dbb9b765
parentf8551254d84a89bf37029e29308309fd46a8b14d (diff)
parent3090f0d215427af30264b183be9165fdeee88c91 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.S b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
index ed91418..0e92667 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.S
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
@@ -427,7 +427,6 @@ cCommHandleDebug:
/* Arg Registers are not preserved since this is invoked explicitly */
push {lr} /* store arg registers */
bl dbg__copyNxtDebugMsg /* setup Debugger Message Buffers, validate input, CPSR returned in R0 */
- pop {lr} /* restore values */
_dbg_getmode r0 /* Get Debug Mode */
cmp r0, #(TRUE & BYTE0) /* Confine it to Byte size */
@@ -436,8 +435,9 @@ cCommHandleDebug:
/* Else, we're in normal operation mode (SVC), or other mode (??!) and need to force a switch to Debug mode */
dbg__bkpt_thumb
_cCommHandleDebug_cont:
- mov r0, #0 /* FIXME: Return Status */
- bx lr
+ mov r0, #0 /* FIXME: Return Status */
+ pop {r1} /* Can't Pop LR directly */
+ bx r1 /* Safe code: actually we should be able to Pop PC since the caller is Thumb Mode */
.ltorg
#endif