qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 13/53] target/hppa: convert to use format_state instead of


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 13/53] target/hppa: convert to use format_state instead of dump_state
Date: Wed, 15 Sep 2021 09:15:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 9/14/21 4:20 PM, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  target/hppa/cpu.c    |  2 +-
>  target/hppa/cpu.h    |  2 +-
>  target/hppa/helper.c | 25 ++++++++++++++-----------
>  3 files changed, 16 insertions(+), 13 deletions(-)

> @@ -110,20 +111,22 @@ void hppa_cpu_dump_state(CPUState *cs, FILE *f, int 
> flags)
>      psw_c[18] = '\0';
>      psw_cb = ((env->psw_cb >> 4) & 0x01111111) | (env->psw_cb_msb << 28);
>  
> -    qemu_fprintf(f, "PSW  " TREG_FMT_lx " CB   " TREG_FMT_lx " %s\n",
> -                 psw, psw_cb, psw_c);
> +    g_string_append_printf(buf,
> +                           "PSW  " TREG_FMT_lx " CB   " TREG_FMT_lx " %s\n",
> +                           psw, psw_cb, psw_c);
>  
>      for (i = 0; i < 32; i++) {
> -        qemu_fprintf(f, "GR%02d " TREG_FMT_lx "%c", i, env->gr[i],
> -                     (i & 3) == 3 ? '\n' : ' ');
> +        g_string_append_printf(buf, "GR%02d " TREG_FMT_lx "%c", i, 
> env->gr[i],
> +                               (i & 3) == 3 ? '\n' : ' ');
>      }
>  #ifndef CONFIG_USER_ONLY
>      for (i = 0; i < 8; i++) {
> -        qemu_fprintf(f, "SR%02d %08x%c", i, (uint32_t)(env->sr[i] >> 32),
> -                     (i & 3) == 3 ? '\n' : ' ');
> +        g_string_append_printf(buf,
> +                               "SR%02d %08x%c", i, (uint32_t)(env->sr[i] >> 
> 32),
> +                               (i & 3) == 3 ? '\n' : ' ');
>      }
>  #endif
> -     qemu_fprintf(f, "\n");
> +     g_string_append_printf(buf, "\n");

        g_string_append_c(buf, '\n');

Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>  
>      /* ??? FR */
>  }
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]