From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24556 invoked by alias); 6 Feb 2014 19:08:02 -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 24547 invoked by uid 89); 6 Feb 2014 19:08:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 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 19:08:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s16J7xda022868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Feb 2014 14:07:59 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s16J7vlu029327; Thu, 6 Feb 2014 14:07:58 -0500 Message-ID: <52F3DD8D.40606@redhat.com> Date: Thu, 06 Feb 2014 19:08:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey 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> <87ha8c2hox.fsf@fleche.redhat.com> In-Reply-To: <87ha8c2hox.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-02/txt/msg00123.txt.bz2 On 02/06/2014 06:56 PM, Tom Tromey wrote: >>>>>> "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. Alright, let's do that then. If something breaks, hopefully people catch it before the next release. If not, well, people that care should test mainline more often. ;-) > > 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. Ah, thanks. -- Pedro Alves