[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/8] gdbstub: don't complain about preemptive ACK chars
From: |
Alex Bennée |
Subject: |
[PATCH 8/8] gdbstub: don't complain about preemptive ACK chars |
Date: |
Thu, 10 Aug 2023 16:36:40 +0100 |
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
---
gdbstub/gdbstub.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index 20b6fe03fb..5f28d5cf57 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);
}
--
2.39.2
- [PATCH 0/8] some testing and gdbstub fixes, Alex Bennée, 2023/08/10
- [PATCH 1/8] gitlab: enable ccache for many build jobs, Alex Bennée, 2023/08/10
- [PATCH 2/8] tests/docker: cleanup non-verbose output, Alex Bennée, 2023/08/10
- [PATCH 3/8] tests/tcg: remove quoting for info output, Alex Bennée, 2023/08/10
- [PATCH 4/8] tests: remove test-gdbstub.py, Alex Bennée, 2023/08/10
- [PATCH 5/8] tests/tcg: clean-up gdb confirm/pagination settings, Alex Bennée, 2023/08/10
- [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars,
Alex Bennée <=
- [PATCH 6/8] tests/tcg: ensure system-mode gdb tests start stopped, Alex Bennée, 2023/08/10
- [PATCH 7/8] gdbstub: more fixes for client Ctrl-C handling, Alex Bennée, 2023/08/10
- Re: [PATCH 0/8] some testing and gdbstub fixes, Peter Maydell, 2023/08/10