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: [RFC 2/9] move some rsp bits into rsp-low.h


On 02/06/2014 06:56 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> 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


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