From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"Yonggang Luo" <luoyonggang@gmail.com>,
"Beraldo Leal" <bleal@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
qemu-arm@nongnu.org, qemu-s390x@nongnu.org,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
gdb-patches@sourceware.org
Subject: [PATCH 8/8] gdbstub: don't complain about preemptive ACK chars
Date: Thu, 10 Aug 2023 16:36:40 +0100 [thread overview]
Message-ID: <20230810153640.1879717-9-alex.bennee@linaro.org> (raw)
In-Reply-To: <20230810153640.1879717-1-alex.bennee@linaro.org>
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
next parent reply other threads:[~2023-08-10 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230810153640.1879717-1-alex.bennee@linaro.org>
2023-08-10 15:36 ` Alex Bennée [this message]
2023-08-10 15:50 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230810153640.1879717-9-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=bleal@redhat.com \
--cc=david@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=iii@linux.ibm.com \
--cc=luoyonggang@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).