On 02/02/2026 23.24, Philippe Mathieu-Daudé wrote:
The CPUClass::disas_set_info() handler is meant to initialize
the %disassemble_info structure; it shoudn't alter the CPU state.
Enforce the CPUState can not be modified by having the handler
take a const pointer.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  include/hw/core/cpu.h   | 2 +-
  target/alpha/cpu.c      | 3 ++-
  target/arm/cpu.c        | 6 +++---
  target/avr/cpu.c        | 2 +-
  target/hexagon/cpu.c    | 3 ++-
  target/hppa/cpu.c       | 2 +-
  target/i386/cpu.c       | 6 +++---
  target/loongarch/cpu.c  | 3 ++-
  target/m68k/cpu.c       | 2 +-
  target/microblaze/cpu.c | 2 +-
  target/mips/cpu.c       | 7 +++++--
  target/openrisc/cpu.c   | 2 +-
  target/ppc/cpu_init.c   | 5 +++--
  target/riscv/cpu.c      | 7 ++++---
  target/rx/cpu.c         | 2 +-
  target/s390x/cpu.c      | 2 +-
  target/sh4/cpu.c        | 3 ++-
  target/sparc/cpu.c      | 3 ++-
  target/xtensa/cpu.c     | 3 ++-
  19 files changed, 38 insertions(+), 27 deletions(-)

Reviewed-by: Thomas Huth <[email protected]>


Reply via email to