[PATCH] target/tricore: Fix gdbstub write to address registers

Richard Henderson posted 1 patch 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221212204959.1353838-1-richard.henderson@linaro.org
Maintainers: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
target/tricore/gdbstub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] target/tricore: Fix gdbstub write to address registers
Posted by Richard Henderson 1 year, 4 months ago
Typo had double-writes to data registers.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/tricore/gdbstub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/tricore/gdbstub.c b/target/tricore/gdbstub.c
index ebf32defde..3a27a7e65d 100644
--- a/target/tricore/gdbstub.c
+++ b/target/tricore/gdbstub.c
@@ -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);
     }
-- 
2.34.1
Re: [PATCH] target/tricore: Fix gdbstub write to address registers
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
On 12/12/22 21:49, Richard Henderson wrote:
> Typo had double-writes to data registers.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/tricore/gdbstub.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>