aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 16:23:18 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 16:23:18 +0000
commit8d4acf9b900f1fb224ee9207d0289a191022b9cf (patch)
treeecc5612816c107e56b86759bfb7025c53249c5c5
parent2cbd949d7acc8381a87ba653ad973aa03e55b475 (diff)
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 <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5821 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--gdbstub.c4
1 files 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) {