* [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars
[not found] <20230810153640.1879717-1-alex.bennee@linaro.org>
@ 2023-08-10 15:36 ` Alex Bennée
2023-08-10 15:50 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2023-08-10 15:36 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Ilya Leoshkevich, Yonggang Luo, Beraldo Leal,
Richard Henderson, Peter Maydell, Philippe Mathieu-Daudé,
Thomas Huth, David Hildenbrand, qemu-arm, qemu-s390x,
Wainer dos Santos Moschetta, gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars
2023-08-10 15:36 ` [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars Alex Bennée
@ 2023-08-10 15:50 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-10 15:50 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Ilya Leoshkevich, Yonggang Luo, Beraldo Leal, Richard Henderson,
Peter Maydell, Thomas Huth, David Hildenbrand, qemu-arm,
qemu-s390x, Wainer dos Santos Moschetta, gdb-patches
On 10/8/23 17:36, Alex Bennée wrote:
> 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(+)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-10 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230810153640.1879717-1-alex.bennee@linaro.org>
2023-08-10 15:36 ` [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars Alex Bennée
2023-08-10 15:50 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).