This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6768

-- gerrit

commit 12e460a926098777006a777aab41c917af671c95
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Sat Dec 4 00:48:23 2021 +0100

    gdb_server: don't send unrequested ACK at connection
    
    On 2008-03-05, before git's age, commit 6d9501467441 adds sending
    an ACK ('+' char) at GDB connection, before receiving any GDB
    remote command that requires to be ACK'ed.
    
    Neither the text added in the commit message ("added ACK upon
    connection (send +)") nor in the associated comment ("send ACK to
    GDB for debug request") provide an exhaustive explanation for
    sending this unsolicited ACK.
    
    This code has never been touched since its introduction.
    
    Analysis of GDB code doesn't show it's required, including old GDB
    code.
    Running gdbserver (from GDB package) and attaching it with "nc"
    shows that gdbserver does not send any ACK to a new connection.
    Same for lldb-server.
    
    Drop it!
    
    Change-Id: Id68c352ce44dd85a1ea3d67446e17e2a241ef058
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 0d2d1ae2c..b68d97e9d 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -993,9 +993,6 @@ static int gdb_new_connection(struct connection *connection)
        gdb_connection->target_desc.tdesc_length = 0;
        gdb_connection->thread_list = NULL;
 
-       /* send ACK to GDB for debug request */
-       gdb_write(connection, "+", 1);
-
        /* output goes through gdb connection */
        command_set_output_handler(connection->cmd_ctx, gdb_output, connection);
 

-- 

Reply via email to