From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
To: gdb-patches@sourceware.org
Cc: tom@tromey.com
Subject: [PATCH v2 3/4] rsp: add 'E' to escaped characters
Date: Thu, 14 Mar 2024 14:07:30 +0100 [thread overview]
Message-ID: <2df4539dd59feb3b70f15ed679563a85bb286075.1710420898.git.tankut.baris.aktemur@intel.com> (raw)
In-Reply-To: <cover.1710420898.git.tankut.baris.aktemur@intel.com>
Add 'E' to the list of escaped characters when sending/receiving
binary data. This is a preparation for the next patch, to be able to
distinguish an error response from binary data that starts with 'E'.
Approved-By: Tom Tromey <tom@tromey.com>
---
gdb/doc/gdb.texinfo | 4 +++-
gdbsupport/rsp-low.cc | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index f2b80db94ef..9a7d61be65e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -42389,7 +42389,9 @@ bytes @code{0x7d 0x5d}. The bytes @code{0x23} (@sc{ascii} @samp{#}),
@samp{@}}) must always be escaped. Responses sent by the stub
must also escape @code{0x2a} (@sc{ascii} @samp{*}), so that it
is not interpreted as the start of a run-length encoded sequence
-(described next).
+(described next). The @code{0x45} (@sc{ascii} @samp{E}) byte should
+also be escaped to distinguish it from an error reply that starts with
+the @samp{E} character.
Response @var{data} can be run-length encoded to save space.
Run-length encoding replaces runs of identical characters with one
diff --git a/gdbsupport/rsp-low.cc b/gdbsupport/rsp-low.cc
index 37dce9d5c74..0a11adc78e5 100644
--- a/gdbsupport/rsp-low.cc
+++ b/gdbsupport/rsp-low.cc
@@ -171,7 +171,7 @@ bin2hex (const gdb_byte *bin, int count)
static int
needs_escaping (gdb_byte b)
{
- return b == '$' || b == '#' || b == '}' || b == '*';
+ return b == '$' || b == '#' || b == '}' || b == '*' || b == 'E';
}
/* See rsp-low.h. */
--
2.34.1
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2024-03-14 13:08 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 15:35 [PATCH 0/3] Introduce the 'x' RSP packet Tankut Baris Aktemur
2024-03-13 15:35 ` [PATCH 1/3] gdbserver: allow suppressing the next putpkt remote-debug log Tankut Baris Aktemur
2024-03-13 19:10 ` Tom Tromey
2024-03-14 10:36 ` Aktemur, Tankut Baris
2024-03-13 15:35 ` [PATCH 2/3] rsp: add 'E' to escaped characters Tankut Baris Aktemur
2024-03-13 19:17 ` Tom Tromey
2024-03-13 15:35 ` [PATCH 3/3] gdb, gdbserver: introduce the 'x' RSP packet for binary memory read Tankut Baris Aktemur
2024-03-13 15:50 ` Luis Machado
2024-03-13 18:21 ` Aktemur, Tankut Baris
2024-03-14 10:01 ` Luis Machado
2024-03-13 15:58 ` Eli Zaretskii
2024-03-13 19:27 ` Tom Tromey
2024-03-14 10:36 ` Aktemur, Tankut Baris
2024-03-14 12:46 ` Tom Tromey
2024-03-15 9:59 ` Aktemur, Tankut Baris
2024-03-19 16:01 ` Tom Tromey
2024-03-20 17:32 ` Aktemur, Tankut Baris
2024-03-20 20:12 ` Tom Tromey
2024-04-05 13:05 ` Andrew Burgess
2024-04-05 14:09 ` Tom Tromey
2024-04-08 21:36 ` Andrew Burgess
2024-03-14 12:34 ` Aktemur, Tankut Baris
2024-03-14 13:07 ` [PATCH v2 0/4] Introduce the 'x' RSP packet Tankut Baris Aktemur
2024-03-14 13:07 ` [PATCH v2 1/4] doc: fine-tune the documentation of the 'm' " Tankut Baris Aktemur
2024-03-14 15:06 ` Eli Zaretskii
2024-03-14 13:07 ` [PATCH v2 2/4] gdbserver: allow suppressing the next putpkt remote-debug log Tankut Baris Aktemur
2024-03-14 13:07 ` Tankut Baris Aktemur [this message]
2024-03-14 13:46 ` [PATCH v2 3/4] rsp: add 'E' to escaped characters Ciaran Woodward
2024-03-14 15:19 ` Aktemur, Tankut Baris
2024-04-05 12:59 ` Andrew Burgess
2024-03-14 15:07 ` Eli Zaretskii
2024-03-14 13:07 ` [PATCH v2 4/4] gdb, gdbserver: introduce the 'x' RSP packet for binary memory read Tankut Baris Aktemur
2024-04-09 7:48 ` [PATCH v3 0/3] Introduce the 'x' RSP packet Tankut Baris Aktemur
2024-04-09 7:48 ` [PATCH v3 1/3] doc: fine-tune the documentation of the 'm' " Tankut Baris Aktemur
2024-04-09 9:27 ` Eli Zaretskii
2024-04-09 7:48 ` [PATCH v3 2/3] gdbserver: allow suppressing the next putpkt remote-debug log Tankut Baris Aktemur
2024-04-09 7:48 ` [PATCH v3 3/3] gdb, gdbserver: introduce the 'x' RSP packet for binary memory read Tankut Baris Aktemur
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=2df4539dd59feb3b70f15ed679563a85bb286075.1710420898.git.tankut.baris.aktemur@intel.com \
--to=tankut.baris.aktemur@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).