qemu/target
Philippe Mathieu-Daudé 46a2cfc448 gdbstub: Clarify no more than @gdb_num_core_regs can be accessed
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 openrisc implementations.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250122093028.52416-3-philmd@linaro.org>
2025-03-06 15:46:17 +01:00
..
alpha fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
arm target/arm/hvf: sign extend the data for a load operation when SSE=1 2025-02-25 15:32:58 +00:00
avr target/*: Remove TARGET_LONG_BITS from cpu-param.h 2025-02-08 12:41:33 -08:00
hexagon target/*: Remove TARGET_LONG_BITS from cpu-param.h 2025-02-08 12:41:33 -08:00
hppa fpu: Always decide snan_bit_is_one() at runtime 2025-02-25 15:32:57 +00:00
i386 * qom: Use command line syntax for default values in help 2025-03-03 10:20:59 +08:00
loongarch target/loongarch: Adjust the cpu reset action to a proper position 2025-03-05 09:45:52 +08:00
m68k fpu: Move m68k_denormal fmt flag into floatx80_behaviour 2025-02-25 15:32:57 +00:00
microblaze gdbstub: Clarify no more than @gdb_num_core_regs can be accessed 2025-03-06 15:46:17 +01:00
mips target/mips: Use VADDR_PRIx for logging pc_next 2025-02-18 08:29:02 -08:00
openrisc gdbstub: Clarify no more than @gdb_num_core_regs can be accessed 2025-03-06 15:46:17 +01:00
ppc fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
riscv target/riscv/kvm: add missing KVM CSRs 2025-03-04 15:42:54 +10:00
rx fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
s390x QAPI patches patches for 2025-02-10 2025-02-10 10:47:31 -05:00
sh4 fpu: Always decide snan_bit_is_one() at runtime 2025-02-25 15:32:57 +00:00
sparc target/sparc: fake UltraSPARC T1 PCR and PIC registers 2025-02-18 08:29:03 -08:00
tricore fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
xtensa target/*: Remove TARGET_LONG_BITS from cpu-param.h 2025-02-08 12:41:33 -08:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00