All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Ramiro Polla <ramiro.polla@gmail.com>
Cc: philmd@redhat.com, qemu-devel@nongnu.org, arilou@gmail.com
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Fix handling of '!' packet with new infra
Date: Tue, 06 Aug 2019 12:26:58 +0100	[thread overview]
Message-ID: <87wofqilfh.fsf@linaro.org> (raw)
In-Reply-To: <20190805190901.14072-1-ramiro.polla@gmail.com>


Ramiro Polla <ramiro.polla@gmail.com> writes:

> Since the '!' packet is not handled by the new infrastructure,
> gdb_handle_packet() would call run_cmd_parser() with a NULL cmd_parser
> value, which would lead to an unsupported packet ("$#00") being sent,
> which could confuse the gdb client.
>
> This also has a side-effect of speeding up the initial connection with
> gdb.
>
> Fixes: 3e2c12615b52 ("gdbstub: Implement deatch (D pkt) with new infra")
> Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>

Queued to gdbstub/next, thanks.

> ---
>  gdbstub.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index b470aec8ea..d051344488 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -2587,7 +2587,9 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
>          break;
>      }
>
> -    run_cmd_parser(s, line_buf, cmd_parser);
> +    if (cmd_parser) {
> +        run_cmd_parser(s, line_buf, cmd_parser);
> +    }
>
>      return RS_IDLE;
>  }


--
Alex Bennée


      reply	other threads:[~2019-08-06 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 19:09 [Qemu-devel] [PATCH] gdbstub: Fix handling of '!' packet with new infra Ramiro Polla
2019-08-06 11:26 ` Alex Bennée [this message]

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=87wofqilfh.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=arilou@gmail.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ramiro.polla@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.