From: Peter Xu <peterx@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [PATCH-for-5.0] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray
Date: Thu, 9 Apr 2020 14:22:15 -0400 [thread overview]
Message-ID: <20200409182215.GA40299@xz-x1> (raw)
In-Reply-To: <20200409172509.4078-1-philmd@redhat.com>
On Thu, Apr 09, 2020 at 07:25:08PM +0200, Philippe Mathieu-Daudé wrote:
> Since a010bdbe719 the gdbstub API takes a GByteArray*.
> Unfortunately we forgot to update the gdb_get_reg*()
> calls. Do it now.
>
> Fixes: a010bdbe719 ("extend GByteArray to read register helpers")
Should this be instead 462474d760 ("target/m68k: use gdb_get_reg
helpers", 2020-03-17)?
> Reported-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> Based-on: <20200409164954.36902-1-peterx@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(One benigh extra line; same thing could happen to me when amending
like this with "---")
> ---
> target/m68k/helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/m68k/helper.c b/target/m68k/helper.c
> index 014657c637..cad4083895 100644
> --- a/target/m68k/helper.c
> +++ b/target/m68k/helper.c
> @@ -109,8 +109,8 @@ static int m68k_fpu_gdb_get_reg(CPUM68KState *env, GByteArray *mem_buf, int n)
> {
> if (n < 8) {
> int len = gdb_get_reg16(mem_buf, env->fregs[n].l.upper);
> - len += gdb_get_reg16(mem_buf + len, 0);
> - len += gdb_get_reg64(mem_buf + len, env->fregs[n].l.lower);
> + len += gdb_get_reg16(mem_buf, 0);
> + len += gdb_get_reg64(mem_buf, env->fregs[n].l.lower);
> return len;
> }
> switch (n) {
> --
> 2.21.1
>
--
Peter Xu
next prev parent reply other threads:[~2020-04-09 18:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 17:25 [PATCH-for-5.0] target/m68k/helper: Fix m68k_fpu_gdb_get_reg() use of GByteArray Philippe Mathieu-Daudé
2020-04-09 18:02 ` Laurent Vivier
2020-04-09 18:22 ` Peter Xu [this message]
2020-04-09 18:35 ` Laurent Vivier
2020-04-09 18:36 ` Laurent Vivier
2020-04-09 18:53 ` Peter Xu
2020-04-09 20:34 ` Alex Bennée
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=20200409182215.GA40299@xz-x1 \
--to=peterx@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=philmd@redhat.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).