From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs
Date: Fri, 28 Nov 2008 11:01:37 +0100 [thread overview]
Message-ID: <492FC181.70000@siemens.com> (raw)
Obviously, someone forgot to rebase the index before accessing one of
the 32 FPRs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
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) {
next reply other threads:[~2008-11-28 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 10:01 Jan Kiszka [this message]
2008-11-30 16:27 ` [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs Aurelien Jarno
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=492FC181.70000@siemens.com \
--to=jan.kiszka@siemens.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).