]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
target/tricore: Fix gdbstub write to address registers
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 12 Dec 2022 20:48:46 +0000 (14:48 -0600)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 18 Dec 2022 17:39:17 +0000 (09:39 -0800)
Typo had double-writes to data registers.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/tricore/gdbstub.c

index ebf32defde3a627fe995982508323400bb9921f1..3a27a7e65d91b868650cefe632a8fe3f46cf7f51 100644 (file)
@@ -130,7 +130,7 @@ int tricore_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
     if (n < 16) { /* data registers */
         env->gpr_d[n] = tmp;
     } else if (n < 32) { /* address registers */
-        env->gpr_d[n - 16] = tmp;
+        env->gpr_a[n - 16] = tmp;
     } else {
         tricore_cpu_gdb_write_csfr(env, n, tmp);
     }