diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-21 12:11:35 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-09 17:00:47 +0100 |
| commit | 0368d8d189af0444cd818f4f695beb1d94706f44 (patch) | |
| tree | 7873c2586d53ce6502fc594ea3a00e8673d5eb50 /gdbstub/user.c | |
| parent | 4c5c410ceb4e039a49a120a436cc6183831a778b (diff) | |
| download | focaccia-qemu-0368d8d189af0444cd818f4f695beb1d94706f44.tar.gz focaccia-qemu-0368d8d189af0444cd818f4f695beb1d94706f44.zip | |
gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff87062
("cpu: cache CPUClass in CPUState for hot code paths"),
use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250122093028.52416-9-philmd@linaro.org>
Diffstat (limited to 'gdbstub/user.c')
| -rw-r--r-- | gdbstub/user.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdbstub/user.c b/gdbstub/user.c index 3730f32c41..67403e5a25 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -743,11 +743,8 @@ int gdb_continue_partial(char *newstates) int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr addr, uint8_t *buf, int len, bool is_write) { - CPUClass *cc; - - cc = CPU_GET_CLASS(cpu); - if (cc->memory_rw_debug) { - return cc->memory_rw_debug(cpu, addr, buf, len, is_write); + if (cpu->cc->memory_rw_debug) { + return cpu->cc->memory_rw_debug(cpu, addr, buf, len, is_write); } return cpu_memory_rw_debug(cpu, addr, buf, len, is_write); } |