[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 26/53] target/tricore: convert to use format_state instead
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 26/53] target/tricore: convert to use format_state instead of dump_state |
Date: |
Wed, 15 Sep 2021 09:29:05 +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/tricore/cpu.c | 2 +-
> target/tricore/cpu.h | 2 +-
> target/tricore/translate.c | 24 ++++++++++++------------
> 3 files changed, 14 insertions(+), 14 deletions(-)
> -void tricore_cpu_dump_state(CPUState *cs, FILE *f, int flags)
> +void tricore_cpu_format_state(CPUState *cs, GString *buf, int flags)
> {
> TriCoreCPU *cpu = TRICORE_CPU(cs);
> CPUTriCoreState *env = &cpu->env;
> @@ -95,26 +95,26 @@ void tricore_cpu_dump_state(CPUState *cs, FILE *f, int
> flags)
>
> psw = psw_read(env);
>
> - qemu_fprintf(f, "PC: " TARGET_FMT_lx, env->PC);
> - qemu_fprintf(f, " PSW: " TARGET_FMT_lx, psw);
> - qemu_fprintf(f, " ICR: " TARGET_FMT_lx, env->ICR);
> - qemu_fprintf(f, "\nPCXI: " TARGET_FMT_lx, env->PCXI);
> - qemu_fprintf(f, " FCX: " TARGET_FMT_lx, env->FCX);
> - qemu_fprintf(f, " LCX: " TARGET_FMT_lx, env->LCX);
> + g_string_append_printf(buf, "PC: " TARGET_FMT_lx, env->PC);
> + g_string_append_printf(buf, " PSW: " TARGET_FMT_lx, psw);
> + g_string_append_printf(buf, " ICR: " TARGET_FMT_lx, env->ICR);
> + g_string_append_printf(buf, "\nPCXI: " TARGET_FMT_lx, env->PCXI);
> + g_string_append_printf(buf, " FCX: " TARGET_FMT_lx, env->FCX);
> + g_string_append_printf(buf, " LCX: " TARGET_FMT_lx, env->LCX);
>
> for (i = 0; i < 16; ++i) {
> if ((i & 3) == 0) {
> - qemu_fprintf(f, "\nGPR A%02d:", i);
> + g_string_append_printf(buf, "\nGPR A%02d:", i);
> }
> - qemu_fprintf(f, " " TARGET_FMT_lx, env->gpr_a[i]);
> + g_string_append_printf(buf, " " TARGET_FMT_lx, env->gpr_a[i]);
> }
> for (i = 0; i < 16; ++i) {
> if ((i & 3) == 0) {
> - qemu_fprintf(f, "\nGPR D%02d:", i);
> + g_string_append_printf(buf, "\nGPR D%02d:", i);
> }
> - qemu_fprintf(f, " " TARGET_FMT_lx, env->gpr_d[i]);
> + g_string_append_printf(buf, " " TARGET_FMT_lx, env->gpr_d[i]);
> }
> - qemu_fprintf(f, "\n");
> + g_string_append_printf(buf, "\n");
g_string_append_c(), otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> }
>
> /*
>
- [PATCH v2 21/53] target/riscv: convert to use format_state instead of dump_state, (continued)
- [PATCH v2 21/53] target/riscv: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 22/53] target/rx: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 23/53] target/s390x: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 24/53] target/sh: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 25/53] target/sparc: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 26/53] target/tricore: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- Re: [PATCH v2 26/53] target/tricore: convert to use format_state instead of dump_state,
Philippe Mathieu-Daudé <=
- [PATCH v2 27/53] target/xtensa: convert to use format_state instead of dump_state, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 28/53] monitor: remove 'info ioapic' HMP command, Daniel P . Berrangé, 2021/09/14
- [PATCH v2 29/53] qapi: introduce x-query-registers QMP command, Daniel P . Berrangé, 2021/09/14