All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs
Date: Sun, 30 Nov 2008 17:27:18 +0100	[thread overview]
Message-ID: <20081130162718.GF11797@hall.aurel32.net> (raw)
In-Reply-To: <492FC181.70000@siemens.com>

On Fri, Nov 28, 2008 at 11:01:37AM +0100, Jan Kiszka wrote:
> Obviously, someone forgot to rebase the index before accessing one of
> the 32 FPRs.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Thanks, applied.

> 
>  gdbstub.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gdbstub.c b/gdbstub.c
> index b522a89..452b7d0 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -428,7 +428,7 @@ static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n)
>          GET_REGL(env->gpr[n]);
>      } else if (n < 64) {
>          /* fprs */
> -        stfq_p(mem_buf, env->fpr[n]);
> +        stfq_p(mem_buf, env->fpr[n-32]);
>          return 8;
>      } else {
>          switch (n) {
> @@ -459,7 +459,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n)
>          return sizeof(target_ulong);
>      } else if (n < 64) {
>          /* fprs */
> -        env->fpr[n] = ldfq_p(mem_buf);
> +        env->fpr[n-32] = ldfq_p(mem_buf);
>          return 8;
>      } else {
>          switch (n) {
> 
> 
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

      reply	other threads:[~2008-11-30 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 10:01 [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs Jan Kiszka
2008-11-30 16:27 ` Aurelien Jarno [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=20081130162718.GF11797@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --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.