Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] Clarify remote protocol RLE example
@ 2007-11-03 16:20 Daniel Jacobowitz
  2007-11-03 18:43 ` Eli Zaretskii
  2007-11-03 19:02 ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Daniel Jacobowitz @ 2007-11-03 16:20 UTC (permalink / raw)
  To: gdb-patches; +Cc: Eli Zaretskii, ukleinek

Uwe pointed out that the example in the GDB manual for run-length
encoding is a bit confusing.  It suggests that "0* " should expand
to 000, but in fact it expands to 0000, because the initial zero
is counted separately.

Is this version clearer?  OK to commit?

-- 
Daniel Jacobowitz
CodeSourcery

2007-11-03  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.texinfo (Overview): Clarify run-length encoding
	example.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.441
diff -u -p -U5 -r1.441 gdb.texinfo
--- gdb.texinfo	30 Oct 2007 19:35:35 -0000	1.441
+++ gdb.texinfo	3 Nov 2007 16:09:21 -0000
@@ -22937,22 +22937,24 @@ must also escape @code{0x2a} (@sc{ascii}
 is not interpreted as the start of a run-length encoded sequence
 (described next).
 
 Response @var{data} can be run-length encoded to save space.  A @samp{*}
 means that the next character is an @sc{ascii} encoding giving a repeat count
-which stands for that many repetitions of the character preceding the
+which stands for that many additional repetitions of the character preceding the
 @samp{*}.  The encoding is @code{n+29}, yielding a printable character
 where @code{n >=3} (which is where rle starts to win).  The printable
 characters @samp{$}, @samp{#}, @samp{+} and @samp{-} or with a numeric
 value greater than 126 should not be used.
 
 So:
 @smallexample
 "@code{0* }"
 @end smallexample
 @noindent
-means the same as "0000".
+means the same as "0000".  The initial @code{0} contributes one zero,
+and the space (@sc{ascii} 32) contributes a repeat count of three
+additional zeros.
 
 The error response returned for some packets includes a two character
 error number.  That number is not well defined.
 
 @cindex empty response, for unsupported packets


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-12-16 22:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-03 16:20 [rfa] Clarify remote protocol RLE example Daniel Jacobowitz
2007-11-03 18:43 ` Eli Zaretskii
2007-11-03 19:02 ` Eli Zaretskii
2007-11-03 19:18   ` Daniel Jacobowitz
2007-11-03 22:08     ` Eli Zaretskii
2007-11-04  4:03       ` Eli Zaretskii
2007-12-16 20:33         ` Daniel Jacobowitz
2007-12-16 22:57           ` Eli Zaretskii
2007-12-16 23:01             ` Daniel Jacobowitz
2007-11-06 18:31     ` Jim Blandy
2007-11-07 19:33       ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox