aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-12-04 00:48:23 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2024-03-02 11:05:47 +0000
commit07141132a7d787005c0829618a60b4a842be7847 (patch)
tree740bf6c809f8fc8f897bd509752ee884b55f407f
parent271c4e5253abcd2ec617d5fb5e1a374d2b6a543d (diff)
downloadriscv-openocd-07141132a7d787005c0829618a60b4a842be7847.zip
riscv-openocd-07141132a7d787005c0829618a60b4a842be7847.tar.gz
riscv-openocd-07141132a7d787005c0829618a60b4a842be7847.tar.bz2
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.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6768 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Reviewed-by: Anatoly P <anatoly.parshintsev@syntacore.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
-rw-r--r--src/server/gdb_server.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 13bc233..b140689 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -1001,9 +1001,6 @@ static int gdb_new_connection(struct connection *connection)
gdb_connection->output_flag = GDB_OUTPUT_NO;
gdb_connection->unique_index = next_unique_id++;
- /* 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);