From: Stefan Hajnoczi <stefanha@gmail.com>
To: Doug Gale <doug16k@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] gdbstub: implement remote debugging protocol escapes for command receive
Date: Fri, 5 May 2017 15:45:06 +0100 [thread overview]
Message-ID: <20170505144506.GA14316@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAEfK_46hGYYpO4YhYcxdUar1ugLQwbpJMgxAJDJU13zSpbD4zw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
On Tue, May 02, 2017 at 10:32:40AM -0400, Doug Gale wrote:
> + } else {
> + /* decode repeat length */
> + int repeat = (unsigned char)ch - ' ' + 3;
> + if (s->line_buf_index + repeat >= sizeof(s->line_buf) - 1) {
> + /* that many repeats would overrun the command buffer */
> +#ifdef DEBUG_GDB
> + printf("gdbstub command buffer overrun,"
> + " dropping command\n");
> +#endif
> + s->state = RS_IDLE;
> + } else if (s->line_buf_index <= 2) {
Why s->line_buf_index <= 2? I expected s->line_buf_index < 1 since we
just need 1 character to clone for run-length decoding.
> + /* got a repeat but we have nothing to repeat */
> +#ifdef DEBUG_GDB
> + printf("gdbstub got invalid RLE sequence\n");
> +#endif
> + } else {
Missing s->state = RS_IDLE?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-05-05 14:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 17:16 [Qemu-devel] [PATCH] gdbstub: implement remote debugging protocol escapes for command receive Doug Gale
2017-05-02 14:22 ` Stefan Hajnoczi
2017-05-02 14:32 ` Doug Gale
2017-05-05 14:45 ` Stefan Hajnoczi [this message]
2017-05-07 15:27 ` Doug Gale
2017-05-07 18:59 ` Doug Gale
[not found] ` <CAEfK_44TpSJVi7JULXMRLftM5BFUJs=vHSxKG3h=YOUjQz1t+g@mail.gmail.com>
2017-05-08 9:01 ` Stefan Hajnoczi
2017-05-08 13:16 ` Doug Gale
2017-05-08 13:32 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170505144506.GA14316@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=doug16k@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).