Commit 8d4acf9b900f1fb224ee9207d0289a191022b9cf
1 parent
2cbd949d
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
Showing
1 changed file
with
2 additions
and
2 deletions
gdbstub.c
... | ... | @@ -428,7 +428,7 @@ static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n) |
428 | 428 | GET_REGL(env->gpr[n]); |
429 | 429 | } else if (n < 64) { |
430 | 430 | /* fprs */ |
431 | - stfq_p(mem_buf, env->fpr[n]); | |
431 | + stfq_p(mem_buf, env->fpr[n-32]); | |
432 | 432 | return 8; |
433 | 433 | } else { |
434 | 434 | switch (n) { |
... | ... | @@ -459,7 +459,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) |
459 | 459 | return sizeof(target_ulong); |
460 | 460 | } else if (n < 64) { |
461 | 461 | /* fprs */ |
462 | - env->fpr[n] = ldfq_p(mem_buf); | |
462 | + env->fpr[n-32] = ldfq_p(mem_buf); | |
463 | 463 | return 8; |
464 | 464 | } else { |
465 | 465 | switch (n) { | ... | ... |