aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-08-10 16:36:40 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-08-10 11:04:34 -0700
commitf1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7 (patch)
tree647cbac351bd02ec56698d662fff2f7145657685
parent3869eb7eee6f6c00d51e8ce8fd71a769f3e0bf3e (diff)
downloadqemu-f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7.zip
qemu-f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7.tar.gz
qemu-f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7.tar.bz2
gdbstub: don't complain about preemptive ACK chars
When starting a remote connection GDB sends an '+': /* Ack any packet which the remote side has already sent. */ remote_serial_write ("+", 1); which gets flagged as a garbage character in the gdbstub state machine. As gdb does send it out lets be permissive about the handling so we can better see real issues. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: gdb-patches@sourceware.org Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230810153640.1879717-9-alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--gdbstub/gdbstub.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 20b6fe0..5f28d5c 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -2074,6 +2074,11 @@ void gdb_read_byte(uint8_t ch)
gdbserver_state.line_buf_index = 0;
gdbserver_state.line_sum = 0;
gdbserver_state.state = RS_GETLINE;
+ } else if (ch == '+') {
+ /*
+ * do nothing, gdb may preemptively send out ACKs on
+ * initial connection
+ */
} else {
trace_gdbstub_err_garbage(ch);
}