From: Andrew Burgess <aburgess@redhat.com>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>,
Ciaran Woodward <ciaranwoodward@xmos.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "tom@tromey.com" <tom@tromey.com>
Subject: RE: [PATCH v2 3/4] rsp: add 'E' to escaped characters
Date: Fri, 05 Apr 2024 13:59:38 +0100 [thread overview]
Message-ID: <87msq82ced.fsf@redhat.com> (raw)
In-Reply-To: <DM4PR11MB730314E0E017660DAC0C9DDBC4292@DM4PR11MB7303.namprd11.prod.outlook.com>
"Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com> writes:
> Hi Ciaran,
>
> On Thursday, March 14, 2024 2:47 PM, Ciaran Woodward wrote:
>> Hi Tankut,
>>
>> > 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'.
>>
>> I wonder if there is a better way to do this, given that this is for a totally
>> new packet. My concerns are twofold:
>>
>> 1. The other 'escaped' characters are part of the RSP packetization layer,
>> which is conceptually below the message processing. This new packet is
>> looking at both escaped and non-escaped message in order to figure out
>> which type of response it is looking at, which is (in my opinion)
>> unnecessary layer crossing.
>>
>> 2. The idea of allowing this list to grow when there are other possible
>> solutions is just less scalable if other new binary packets are added
>> in the future.
>>
>> Instead, I would propose a similar approach to other packets which would
>> have the potential for 'ambiguous' replies, such as 'qCRC', 'qMemTags' etc.
>>
>> That is: Always have a leading byte (not just in the error case) in order
>> to disambiguate what type of reply the message contains.
>>
>> So (for example) the message is something more like:
>>
>> 'E NN' for an error
>>
>> 'd XX...' for binary data
>>
>> Does that sound reasonable?
>> (Note that I am not a maintainer, so would appreciate other opinions!)
>>
>> Thanks,
>> Ciaran
>
> My goal was to keep similarity to packets like 'm', 'g', 'p'. Starting the reply with
> a marker is certainly doable. Let's see what the maintainers will say. If that's the
> direction, I can work on the change.
I'd vote for using a prefix character. Yes it means we diverge from
m/g/p, but those are some of our older packets, as you've pointed out in
other messages, there are problems with those packets (w.r.t. the empty
case). I think using a better solution is more important than
consistency.
Thanks,
Andrew
next prev parent reply other threads:[~2024-04-05 12:59 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 ` [PATCH v2 3/4] rsp: add 'E' to escaped characters Tankut Baris Aktemur
2024-03-14 13:46 ` Ciaran Woodward
2024-03-14 15:19 ` Aktemur, Tankut Baris
2024-04-05 12:59 ` Andrew Burgess [this message]
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=87msq82ced.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=ciaranwoodward@xmos.com \
--cc=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.com \
--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).