From: Philippe Mathieu-Daudé Date: Mon, 29 Dec 2025 22:48:41 +0000 (+0100) Subject: target/hppa: Remove unnecessary @cpu variable by using cpu_env() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53afb5ed5cfeff1211c255f86f38d87e3a5d5fc;p=thirdparty%2Fqemu.git target/hppa: Remove unnecessary @cpu variable by using cpu_env() 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é Reviewed-by: Manos Pitsidianakis Reviewed-by: Richard Henderson Message-ID: <20251229225517.45078-3-philmd@linaro.org> --- diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index 777f4a48b9..0c5e41410a 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -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)) {