mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff8706
("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>
This commit is contained in:
parent
4c5c410ceb
commit
0368d8d189
4 changed files with 15 additions and 31 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue