From 8d4acf9b900f1fb224ee9207d0289a191022b9cf Mon Sep 17 00:00:00 2001 From: aurel32 Date: Sun, 30 Nov 2008 16:23:18 +0000 Subject: [PATCH] gdbstub: Fix access to PPC FPRs Obviously, someone forgot to rebase the index before accessing one of the 32 FPRs. Signed-off-by: Jan Kiszka Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5821 c046a42c-6fe2-441c-8c8c-71466251a162 --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b522a8923a..452b7d0ecd 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) { -- 2.11.4.GIT