This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 2/9] move some rsp bits into rsp-low.h
- From: Yao Qi <yao at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jan 2014 11:22:21 +0800
- Subject: Re: [RFC 2/9] move some rsp bits into rsp-low.h
- Authentication-results: sourceware.org; auth=none
- References: <1390245501-1186-1-git-send-email-tromey at redhat dot com> <1390245501-1186-3-git-send-email-tromey at redhat dot com>
On 01/21/2014 03:18 AM, Tom Tromey wrote:
> Note that the two variants of remote_escape_output disagreed on the
> treatment of "*". On the theory that quoting cannot hurt but the
> absence possibly can, I chose the gdbserver variant to be the
> canonical one.
Right, we must escape "*", because "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).", said in
https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.html
> +
> +/* Convert BUFFER, escaped data LEN bytes long, into binary data
> + in OUT_BUF. Return the number of bytes written to OUT_BUF.
> + Raise an error if the total number of bytes exceeds OUT_MAXLEN.
> +
> + This function reverses remote_escape_output. It allows more
> + escaped characters than that function does, in particular because
I know these comments are moved mechanically, but it is out of date.
We can remove this line...
> + '*' must be escaped to avoid the run-length encoding processing
> + in reading packets. */
... and move this line to remote_escape_output to explain why '*' is
escaped.
> +
> +extern int remote_unescape_input (const gdb_byte *buffer, int len,
> + gdb_byte *out_buf, int out_maxlen);
> +
--
Yao (éå)