This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfa] Clarify remote protocol RLE example
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, ukleinek at informatik dot uni-freiburg dot de, Jim Blandy <jimb at codesourcery dot com>
- Date: Sat, 3 Nov 2007 15:18:22 -0400
- Subject: Re: [rfa] Clarify remote protocol RLE example
- References: <20071103161956.GA7885@caradoc.them.org> <usl3nqhku.fsf@gnu.org>
On Sat, Nov 03, 2007 at 09:01:21PM +0200, Eli Zaretskii wrote:
> Response @var{data} can be run-length encoded to save space.
> Run-length encoding replaces runs of identical characters with the
> character @samp{*} followed by a repeat count.
How about "with an initial character, the character @samp{*}, and a
repeat count"? With that, I quite like your version.
> > The printable
> > characters @samp{$}, @samp{#}, @samp{+} and @samp{-} or with a numeric
> > value greater than 126 should not be used.
>
> This part I simply don't understand. What does it mean ``should not
> be used''? what should be done instead? break the string into several
> smaller ones?
May not be used (they have special syntactical meaning in the
protocol). So you need to stop the RLE string one character earlier,
e.g.:
{0} 0
{00} 00
{000} 000
{0* } 0000
{0*!} 00000
{0*"} 000000
{0*"0} 0000000
{0*"00} 00000000
{0*%} 000000000
Rereading this, and looking at my notes in gdbserver, I don't think
there is any point to the restriction on + or -. They're the protocol
ack and nack characters, but they can already appear elsewhere in
responses. Jim, do you see any reason they should be forbidden?
--
Daniel Jacobowitz
CodeSourcery