summaryrefslogtreecommitdiff
path: root/Debugger/debug_comm.S
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-04-01 07:58:03 +0800
committerTat-Chee Wan (USM)2011-04-01 07:58:03 +0800
commitf6f876da76fe7d6f819fd82723848a3b90edce60 (patch)
treee0fe7d3862c44b6edb4843f487075d5fcb5ba4ba /Debugger/debug_comm.S
parentc12a111949acd48aacb16caa993fc23e28455ac4 (diff)
refactored message ack or nak routines to always send a reply to any gdb message
For GDB commands such as Continue or Step, no reply is expected. However, the GDB server needs to receive a reply to avoid hanging the read() command on the Host side. Consequently these 2 commands now send an Ack (no message) to keep the GDB server happy.
Diffstat (limited to 'Debugger/debug_comm.S')
-rw-r--r--Debugger/debug_comm.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S
index 6635618..9cc9702 100644
--- a/Debugger/debug_comm.S
+++ b/Debugger/debug_comm.S
@@ -960,17 +960,19 @@ exit_dbg__putMsgError:
exit_dbg__putDebugMsg:
ldmfd sp!, {r4,r5,pc}
- .global dbg__requestRetransmission
-/* dbg__requestRetransmission
- * Request for Retransmission due to received message Checksum error (Blocking) .
+ .global dbg__sendAckOrNak
+/* dbg__sendAckOrNak
+ * Send Ack (for successful receipt of message)
+ * or Nak (for Retransmission due to received message Checksum error) (Blocking) .
* On entry:
* No parameters (assume pointers were initialized previously using dbg__comm_init)
* On exit:
* r0: status (0: success, -1: error)
* r1: destroyed
- * Note: A Retransmission is indicated by '-', which is prepended with the USB header and sent (without checksum)
+ * Note: An Ack Or Nak is indicated by '+' or '-', which is prepended with the USB header and sent (without checksum)
+ * Sending Ack is only done for Continue and Step commands, where GDB does not expect any replies.
*/
-dbg__requestRetransmission:
+dbg__sendAckOrNak:
stmfd sp!, {lr}
ldr r1, =debug_msgTxBufPtr /* R2: data structure base pointer */
ldr r0, [r1] /* Tx buffer Start Address */