mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
gdbstub: Infer number of core registers from XML
GDBFeature has the num_regs member so use it where applicable to remove magic numbers. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20231213-gdb-v17-8-777047380591@daynix.com> [AJB: remove core reg check from microblaze read reg] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-13-alex.bennee@linaro.org>
This commit is contained in:
committed by
Alex Bennée
parent
ee59fa1dd5
commit
ecd6f6a882
@ -546,9 +546,12 @@ void gdb_init_cpu(CPUState *cpu)
|
||||
gdb_register_feature(cpu, 0,
|
||||
cc->gdb_read_register, cc->gdb_write_register,
|
||||
feature);
|
||||
cpu->gdb_num_regs = cpu->gdb_num_g_regs = feature->num_regs;
|
||||
}
|
||||
|
||||
cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
|
||||
if (cc->gdb_num_core_regs) {
|
||||
cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;
|
||||
}
|
||||
}
|
||||
|
||||
void gdb_register_coprocessor(CPUState *cpu,
|
||||
|
Reference in New Issue
Block a user