Philippe Mathieu-Daudé <phi...@linaro.org> writes: > Both CPUClass::gdb_read_register() and CPUClass::gdb_write_register() > handlers are called from common gdbstub code, and won't be called with > register index over CPUClass::gdb_num_core_regs: > > int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) > { > CPUClass *cc = CPU_GET_CLASS(cpu); > > if (reg < cc->gdb_num_core_regs) { > return cc->gdb_read_register(cpu, buf, reg); > } > ... > } > > static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg) > { > CPUClass *cc = CPU_GET_CLASS(cpu); > > if (reg < cc->gdb_num_core_regs) { > return cc->gdb_write_register(cpu, mem_buf, reg); > } > ... > } > > Clarify that in CPUClass docstring, and remove unreachable code on > the microblaze and tricore implementations. > > Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org> -- Alex Bennée Virtualisation Tech Lead @ Linaro