From 6cfc6ae6394d24a03be2ccb6654f0722ca3cea7c Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Fri, 18 Mar 2011 17:03:29 +0800 Subject: status flags ares not consisent after pop --- Debugger/debug_stub.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3