aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Debugger/debug_stub.S
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-01-12 16:30:33 +0800
committerTat-Chee Wan (USM)2011-01-12 16:30:33 +0800
commitcc6dfb5609d3b6b5fef576146b334c925c0b80d3 (patch)
tree0cfd61459709b69f7b453656829e6ccc3ce948a6 /AT91SAM7S256/armdebug/Debugger/debug_stub.S
parent067403060e4310a730b4ca19cf06aeb101d17af2 (diff)
parenteec175220428b9d63534086fbc05c72b01378acd (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/Debugger/debug_stub.S')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.S13
1 files changed, 7 insertions, 6 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.S b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
index c6e7ca8..508b619 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.S
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
@@ -341,6 +341,8 @@ debug_armComplexCCTable:
* Each Breakpoint State will initially be zeroed.
*
*/
+ /* FIXME: The Debugger Stack Frame is probably not 100% consistent with the order that
+ GDB expects in the g/G messages. CSPR is probably located above R15 */
/****************************************************************************
*
@@ -467,12 +469,11 @@ dbg__bkpt_offset_outofrange:
*
****************************************************************************/
dbg__bkpt_waitCMD:
-1: bl dbg__hasDebugMsg /* Check for messages */
- beq 1b /* Busy wait */
- bl dbg__getDebugMsg /* Read new message from Debugger, message buffer addr in R0, NULL if error */
- teq r0, #0
- moveq r0, #MSG_ERRCHKSUM /* Message invalid, checksum error? */
- beq _dbg__cmdError /* Send response to GDB server */
+1: bl dbg__getDebugMsg /* Read new message from Debugger, message buffer addr in R0, NULL if error */
+ cmp r0, #0
+ beq 1b /* No message yet, keep checking */
+ movlt r0, #MSG_ERRCHKSUM /* Message invalid, checksum error? */
+ blt _dbg__cmdError /* Send response to GDB server */
/* Message now has $<packet info>\0 */
mov r4, r0 /* Use R4 as Message Buffer pointer */
ldrb r0, [r4], #1 /* Look for '$' */