This is an automated email from Gerrit. "Kirill Radkin <kirill.rad...@syntacore.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7927
-- gerrit commit 8978826b86329da5a3035b15c8c028eda2c0a486 Author: Kirill Radkin <kirill.rad...@syntacore.com> Date: Tue Oct 3 14:04:16 2023 +0300 server/gdb_server: Add more error messages in gdb_new_connection Change-Id: I78cccfb297ddf7be418da62f2ed17e12af97b5d1 Signed-off-by: Kirill Radkin <kirill.rad...@syntacore.com> diff --git a/jimtcl b/jimtcl index 1933e5457b..70b007b636 160000 --- a/jimtcl +++ b/jimtcl @@ -1 +1 @@ -Subproject commit 1933e5457b9512d39ebbe11ed32578aada149f49 +Subproject commit 70b007b63669a709b0e8aef34a22658047815cc2 diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 497f62c429..764e72c62b 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -995,7 +995,11 @@ static int gdb_new_connection(struct connection *connection) gdb_connection->output_flag = GDB_OUTPUT_NO; /* send ACK to GDB for debug request */ - gdb_write(connection, "+", 1); + retval = gdb_write(connection, "+", 1); + if (retval != ERROR_OK) { + LOG_ERROR("Could not send GDB Ack packet. gdb_write() error: %d", retval); + return retval; + } /* output goes through gdb connection */ command_set_output_handler(connection->cmd_ctx, gdb_output, connection); @@ -1014,8 +1018,10 @@ static int gdb_new_connection(struct connection *connection) * Remove the initial ACK from the incoming buffer. */ retval = gdb_get_char(connection, &initial_ack); - if (retval != ERROR_OK) + if (retval != ERROR_OK) { + LOG_ERROR("Could not receive GDB Ack packet. gdb_get_char() error: %d", retval); return retval; + } if (initial_ack != '+') gdb_putback_char(connection, initial_ack); --