This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] Clarify remote protocol RLE example


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]