qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs
@ 2008-11-28 10:01 Jan Kiszka
  2008-11-30 16:27 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2008-11-28 10:01 UTC (permalink / raw)
  To: qemu-devel

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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-30 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 10:01 [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs Jan Kiszka
2008-11-30 16:27 ` Aurelien Jarno

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).