From f6f876da76fe7d6f819fd82723848a3b90edce60 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Fri, 1 Apr 2011 07:58:03 +0800 Subject: 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. --- Debugger/debug_comm.S | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Debugger/debug_comm.S') 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 */ -- cgit v1.2.3