]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/hppa: Remove unnecessary @cpu variable by using cpu_env()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Dec 2025 22:48:41 +0000 (23:48 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 12 Jan 2026 22:47:56 +0000 (23:47 +0100)
Partly revert changes introduced by commit b2c2d00f48c ("target/hppa:
add 64 bit support to gdbstub"), restoring the cpu_env() call and
removing the unused @cpu argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251229225517.45078-3-philmd@linaro.org>

target/hppa/gdbstub.c

index 777f4a48b9999f493b7866bc897fef512cae58a8..0c5e41410a053c387107b63d2f198f29f6ac925a 100644 (file)
@@ -33,8 +33,7 @@ static int hppa_reg_size(CPUHPPAState *env)
 
 int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 {
-    HPPACPU *cpu = HPPA_CPU(cs);
-    CPUHPPAState *env = &cpu->env;
+    CPUHPPAState *env = cpu_env(cs);
     target_ulong val;
 
     if (n >= hppa_num_regs(env)) {
@@ -162,8 +161,7 @@ int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 
 int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
 {
-    HPPACPU *cpu = HPPA_CPU(cs);
-    CPUHPPAState *env = &cpu->env;
+    CPUHPPAState *env = cpu_env(cs);
     target_ulong val;
 
     if (n >= hppa_num_regs(env)) {