aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-07-06 09:38:56 +0800
committerTat-Chee Wan (USM)2011-07-06 09:38:56 +0800
commite04b88b669338243a7228a86eff3c0c62aff8f9c (patch)
tree50cef846f09175131dea6fa95bc97eec882fc773
parent5adc436b9b0f10dc8461570d75bf9d0d4aeb3850 (diff)
attempt to fix gdb nak retransmit endless loop
When GDB sends a NAK (-) but does not receive what it expects, it will keep trying to get a valid response. We just try to retransmit the last message in this case, hopefully GDB will be satisfied.
-rw-r--r--Debugger/debug_comm.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S
index e237999..7bb150f 100644
--- a/Debugger/debug_comm.S
+++ b/Debugger/debug_comm.S
@@ -398,7 +398,11 @@ _hasMsg2Copy:
beq exit_dbg__getDebugMsg /* Valid length, return */
exit_dbg__getMsgError:
+ bl dbg__putDebugMsg /* Retransmit message */
+ mov r0, #0 /* Flag no message received */
+#if 0
mov r0, #MSGBUF_MSGERROR
+#endif
exit_dbg__getDebugMsg:
mov r1, r5 /* Return GDB Message Buffer Pointer in R1 */
ldmfd sp!, {r4,r5,pc}