On Tue, 20 Oct 2026 21:27:51 +0900,
Peter Maydell wrote:
> 
> Convert rx to providing the translate_for_debug method rather than
> the deprecated get_phys_addr_debug method.
> 
> Signed-off-by: Peter Maydell <[email protected]>
> ---
>  target/rx/cpu.h    |  3 ++-
>  target/rx/cpu.c    |  2 +-
>  target/rx/helper.c | 10 ++++++++--
>  3 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/target/rx/cpu.h b/target/rx/cpu.h
> index 64ba48a7329..8ec704a9f72 100644
> --- a/target/rx/cpu.h
> +++ b/target/rx/cpu.h
> @@ -136,7 +136,8 @@ struct RXCPUClass {
>  const char *rx_crname(uint8_t cr);
>  void rx_cpu_do_interrupt(CPUState *cpu);
>  bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req);
> -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
> +bool rx_cpu_translate_for_debug(CPUState *cpu, vaddr addr,
> +                                TranslateForDebugResult *result);
>  void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
>  int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
>  int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
> diff --git a/target/rx/cpu.c b/target/rx/cpu.c
> index 9b8473d71cf..0bcfec1d7c0 100644
> --- a/target/rx/cpu.c
> +++ b/target/rx/cpu.c
> @@ -209,7 +209,7 @@ static void rx_cpu_init(Object *obj)
>  
>  static const struct SysemuCPUOps rx_sysemu_ops = {
>      .has_work = rx_cpu_has_work,
> -    .get_phys_addr_debug = rx_cpu_get_phys_addr_debug,
> +    .translate_for_debug = rx_cpu_translate_for_debug,
>  };
>  
>  static const TCGCPUOps rx_tcg_ops = {
> diff --git a/target/rx/helper.c b/target/rx/helper.c
> index 0f99279bbaa..1f73fed6efd 100644
> --- a/target/rx/helper.c
> +++ b/target/rx/helper.c
> @@ -147,7 +147,13 @@ bool rx_cpu_exec_interrupt(CPUState *cs, int 
> interrupt_request)
>      return false;
>  }
>  
> -hwaddr rx_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr)
> +bool rx_cpu_translate_for_debug(CPUState *cs, vaddr addr,
> +                                TranslateForDebugResult *result)
>  {
> -    return addr;
> +    *result = (TranslateForDebugResult) {
> +        .physaddr = addr,
> +        .lg_page_size = TARGET_PAGE_BITS,
> +        .attrs.debug = 1,
> +    };
> +    return true;
>  }
> -- 
> 2.43.0
> 

Reviewed-by: Yoshinori Sato <[email protected]>

-- 
Yosinori Sato

Reply via email to