[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/25] target/ppc: Fix XER access in gdbstub
From: |
David Gibson |
Subject: |
[PULL 10/25] target/ppc: Fix XER access in gdbstub |
Date: |
Thu, 21 Oct 2021 15:20:12 +1100 |
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
The value of XER is split in multiple fields of CPUPPCState, like
env->xer and env->so. To get/set the whole register from gdb, we should
use cpu_read_xer/cpu_write_xer.
Fixes: da91a00f191f ("target-ppc: Split out SO, OV, CA fields from XER")
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211014223234.127012-3-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/gdbstub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
index 1808a150e4..105c2f7dd1 100644
--- a/target/ppc/gdbstub.c
+++ b/target/ppc/gdbstub.c
@@ -159,7 +159,7 @@ int ppc_cpu_gdb_read_register(CPUState *cs, GByteArray
*buf, int n)
gdb_get_regl(buf, env->ctr);
break;
case 69:
- gdb_get_reg32(buf, env->xer);
+ gdb_get_reg32(buf, cpu_read_xer(env));
break;
case 70:
gdb_get_reg32(buf, env->fpscr);
@@ -217,7 +217,7 @@ int ppc_cpu_gdb_read_register_apple(CPUState *cs,
GByteArray *buf, int n)
gdb_get_reg64(buf, env->ctr);
break;
case 69 + 32:
- gdb_get_reg32(buf, env->xer);
+ gdb_get_reg32(buf, cpu_read_xer(env));
break;
case 70 + 32:
gdb_get_reg64(buf, env->fpscr);
@@ -269,7 +269,7 @@ int ppc_cpu_gdb_write_register(CPUState *cs, uint8_t
*mem_buf, int n)
env->ctr = ldtul_p(mem_buf);
break;
case 69:
- env->xer = ldl_p(mem_buf);
+ cpu_write_xer(env, ldl_p(mem_buf));
break;
case 70:
/* fpscr */
@@ -319,7 +319,7 @@ int ppc_cpu_gdb_write_register_apple(CPUState *cs, uint8_t
*mem_buf, int n)
env->ctr = ldq_p(mem_buf);
break;
case 69 + 32:
- env->xer = ldl_p(mem_buf);
+ cpu_write_xer(env, ldl_p(mem_buf));
break;
case 70 + 32:
/* fpscr */
--
2.31.1
- [PULL 07/25] hw/ppc: Fix iothread locking in the 405 code, (continued)
- [PULL 07/25] hw/ppc: Fix iothread locking in the 405 code, David Gibson, 2021/10/21
- [PULL 04/25] target/ppc: Fix the test raising the decrementer exception, David Gibson, 2021/10/21
- [PULL 17/25] ppc/pegasos2: Add constants for PCI config addresses, David Gibson, 2021/10/21
- [PULL 15/25] ppc/pegasos2: Implement get-time-of-day RTAS function with VOF, David Gibson, 2021/10/21
- [PULL 01/25] spapr/xive: Add source status helpers, David Gibson, 2021/10/21
- [PULL 09/25] linux-user/ppc: Fix XER access in save/restore_user_regs, David Gibson, 2021/10/21
- [PULL 05/25] hw/ppc/spapr_softmmu: Reduce include list, David Gibson, 2021/10/21
- [PULL 12/25] target/ppc: Fix XER access in monitor, David Gibson, 2021/10/21
- [PULL 03/25] target/ppc: Use tcg_constant_i64() in gen_brh(), David Gibson, 2021/10/21
- [PULL 11/25] linux-user: Fix XER access in ppc version of elf_core_copy_regs, David Gibson, 2021/10/21
- [PULL 10/25] target/ppc: Fix XER access in gdbstub,
David Gibson <=
- [PULL 08/25] tests/acceptance: Add tests for the ppc405 boards, David Gibson, 2021/10/21
- [PULL 13/25] ppc/pegasos2: Restrict memory to 2 gigabytes, David Gibson, 2021/10/21
- [PULL 20/25] target/ppc: Filter mtmsr[d] input before setting MSR, David Gibson, 2021/10/21
- [PULL 14/25] ppc/pegasos2: Warn when using VOF but no kernel is specified, David Gibson, 2021/10/21
- [PULL 18/25] ppc/pegasos2: Implement power-off RTAS function with VOF, David Gibson, 2021/10/21
- [PULL 16/25] ppc/pegasos2: Access MV64361 registers via their memory region, David Gibson, 2021/10/21
- [PULL 19/25] tests/acceptance: Add a test for the bamboo ppc board, David Gibson, 2021/10/21
- [PULL 22/25] target/ppc: add user read/write functions for MMCR0, David Gibson, 2021/10/21
- [PULL 23/25] target/ppc: add user read/write functions for MMCR2, David Gibson, 2021/10/21
- [PULL 25/25] hw/ppc/ppc4xx_pci: Fix ppc4xx_pci_map_irq() for recent Linux kernels, David Gibson, 2021/10/21