All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "Jon Doron" <arilou@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v1 5/5] gdbstub: revert to previous set_reg behaviour
Date: Wed, 10 Jul 2019 11:33:25 +0200	[thread overview]
Message-ID: <CAL1e-=jTA+kcq-Z25nXH4gy-cd99L4u3DsWo2qN5u8xN49uQ7g@mail.gmail.com> (raw)
In-Reply-To: <87o922dyog.fsf@zen.linaroharston>

On Jul 10, 2019 11:30 AM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>
>
> Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:
>
> > On Jul 5, 2019 6:08 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
> >>
> >> The refactoring of handle_set_reg missed the fact we previously had
> >> responded with an empty packet when we were not using XML based
> >> protocols. This broke the fallback behaviour for architectures that
> >> don't have registers defined in QEMU's gdb-xml directory.
> >>
> >> Revert to the previous behaviour and clean up the commentary for what
> >> is going on.
> >>
> >> Fixes: 62b3320bddd
> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> >> Cc: Jon Doron <arilou@gmail.com>
> >> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> >> ---
> >
> > Do you plan to integrate this patch in 4.1?
> >
> > Thanks, Aleksandar
>
> Yes - I'm putting together a PR today.
>

That's great, thanks!!

Aleksandar

> >
> >>  gdbstub.c | 18 ++++++++++++------
> >>  1 file changed, 12 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/gdbstub.c b/gdbstub.c
> >> index ea3349d1aa..b6df7ee25a 100644
> >> --- a/gdbstub.c
> >> +++ b/gdbstub.c
> >> @@ -1669,12 +1669,23 @@ static void handle_remove_bp(GdbCmdContext
> > *gdb_ctx, void *user_ctx)
> >>      put_packet(gdb_ctx->s, "E22");
> >>  }
> >>
> >> +/*
> >> + * handle_set/get_reg
> >> + *
> >> + * Older gdb are really dumb, and don't use 'G/g' if 'P/p' is
available.
> >> + * This works, but can be very slow. Anything new enough to understand
> >> + * XML also knows how to use this properly. However to use this we
> >> + * need to define a local XML file as well as be talking to a
> >> + * reasonably modern gdb. Responding with an empty packet will cause
> >> + * the remote gdb to fallback to older methods.
> >> + */
> >> +
> >>  static void handle_set_reg(GdbCmdContext *gdb_ctx, void *user_ctx)
> >>  {
> >>      int reg_size;
> >>
> >>      if (!gdb_has_xml) {
> >> -        put_packet(gdb_ctx->s, "E00");
> >> +        put_packet(gdb_ctx->s, "");
> >>          return;
> >>      }
> >>
> >> @@ -1694,11 +1705,6 @@ static void handle_get_reg(GdbCmdContext
*gdb_ctx,
> > void *user_ctx)
> >>  {
> >>      int reg_size;
> >>
> >> -    /*
> >> -     * Older gdb are really dumb, and don't use 'g' if 'p' is
avaialable.
> >> -     * This works, but can be very slow.  Anything new enough to
> >> -     * understand XML also knows how to use this properly.
> >> -     */
> >>      if (!gdb_has_xml) {
> >>          put_packet(gdb_ctx->s, "");
> >>          return;
> >> --
> >> 2.20.1
> >>
> >>
>
>
> --
> Alex Bennée

      reply	other threads:[~2019-07-10  9:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 16:04 [Qemu-devel] [PATCH for 4.1 0/5] tcg tests and gdbstub fixes Alex Bennée
2019-07-05 16:04 ` [Qemu-devel] [PATCH v1 1/5] target/arm/vfp_helper: Call set_fpscr_to_host before updating FPSCR reg Alex Bennée
2019-07-05 16:04 ` [Qemu-devel] [PATCH v1 2/5] tests/tcg: fix up test-i386-fprem.ref generation Alex Bennée
2019-07-10  6:58   ` Richard Henderson
2019-07-10 10:41   ` Philippe Mathieu-Daudé
2019-07-10 11:32     ` Alex Bennée
2019-07-05 16:04 ` [Qemu-devel] [PATCH v1 3/5] tests/tcg: fix diff-out pass to properly report failure Alex Bennée
2019-07-10  7:41   ` Richard Henderson
2019-07-10  8:38     ` Alex Bennée
2019-07-05 16:04 ` [Qemu-devel] [PATCH v1 4/5] gdbstub: add some notes to the header comment Alex Bennée
2019-07-05 16:14   ` Philippe Mathieu-Daudé
2019-07-10  7:14   ` Richard Henderson
2019-07-10 15:28     ` Alex Bennée
2019-07-05 16:04 ` [Qemu-devel] [PATCH v1 5/5] gdbstub: revert to previous set_reg behaviour Alex Bennée
2019-07-10  7:15   ` Richard Henderson
2019-07-10  9:17   ` Aleksandar Markovic
2019-07-10  9:30     ` Alex Bennée
2019-07-10  9:33       ` Aleksandar Markovic [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='CAL1e-=jTA+kcq-Z25nXH4gy-cd99L4u3DsWo2qN5u8xN49uQ7g@mail.gmail.com' \
    --to=aleksandar.m.mail@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=arilou@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --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 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.