From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13090 invoked by alias); 3 Nov 2007 16:20:04 -0000 Received: (qmail 13029 invoked by uid 22791); 3 Nov 2007 16:20:02 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Nov 2007 16:19:59 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 9C9D19834A; Sat, 3 Nov 2007 16:19:57 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 09C4E9829E; Sat, 3 Nov 2007 16:19:57 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IoLj2-0002Ie-7A; Sat, 03 Nov 2007 12:19:56 -0400 Date: Sat, 03 Nov 2007 16:20:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: Eli Zaretskii , ukleinek@informatik.uni-freiburg.de Subject: [rfa] Clarify remote protocol RLE example Message-ID: <20071103161956.GA7885@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org, Eli Zaretskii , ukleinek@informatik.uni-freiburg.de MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00029.txt.bz2 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 * 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