From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6947 invoked by alias); 6 Feb 2014 18:56:52 -0000 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 Received: (qmail 6938 invoked by uid 89); 6 Feb 2014 18:56:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Feb 2014 18:56:50 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s16IumZM022086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Feb 2014 13:56:48 -0500 Received: from barimba (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s16IukVt015008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 6 Feb 2014 13:56:47 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC 2/9] move some rsp bits into rsp-low.h References: <1390245501-1186-1-git-send-email-tromey@redhat.com> <1390245501-1186-3-git-send-email-tromey@redhat.com> <52F2A013.8000903@redhat.com> Date: Thu, 06 Feb 2014 18:56:00 -0000 In-Reply-To: <52F2A013.8000903@redhat.com> (Pedro Alves's message of "Wed, 05 Feb 2014 20:33:23 +0000") Message-ID: <87ha8c2hox.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-02/txt/msg00119.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Hmm. This makes me a tiny bit nervous. What if some random Pedro> silly stub out there is checking that the resulting byte after Pedro> unescaping is one of '#', '$' or '}'? But maybe that's being Pedro> overzealous... Naturally we can't rule this out, but I think that, due to the way the RSP text is written in the manual, it is pretty unlikely: The binary data representation uses `7d' (ASCII `}') as an escape character. Any escaped byte is transmitted as the escape character followed by the original character XORed with `0x20'. For example, the byte `0x7d' would be transmitted as the two bytes `0x7d 0x5d'. The bytes `0x23' (ASCII `#'), `0x24' (ASCII `$'), and `0x7d' (ASCII `}') must always be escaped. Responses sent by the stub must also escape `0x2a' (ASCII `*'), so that it is not interpreted as the start of a run-length encoded sequence (described next). I think it's clear from this that the rule is that any character may be escaped; and furthermore I think anyone implementing this would tend to treat it generically. Pedro> Note this loses i18n in GDB. Please add _(). [...] Pedro> i18n. Fixed. >> $(srcdir)/common/buffer.c $(srcdir)/common/linux-btrace.c \ >> $(srcdir)/common/filestuff.c $(srcdir)/target/waitstatus.c \ >> - $(srcdir)/common/mips-linux-watch.c $(srcdir)/common/cells.c >> + $(srcdir)/common/mips-linux-watch.c $(srcdir)/common/cells.c \ >> + $(srcdir)/common/rsp-low.c Pedro> Something odd with indentation? It's pre-existing in the Makefile. I'll fix it separately in a few. Tom