diff options
Diffstat (limited to 'target-xtensa')
-rw-r--r-- | target-xtensa/cpu-qom.h | 2 | ||||
-rw-r--r-- | target-xtensa/cpu.c | 1 | ||||
-rw-r--r-- | target-xtensa/op_helper.c | 4 | ||||
-rw-r--r-- | target-xtensa/translate.c | 6 |
4 files changed, 10 insertions, 3 deletions
diff --git a/target-xtensa/cpu-qom.h b/target-xtensa/cpu-qom.h index af0ce2823c..30506cf6d5 100644 --- a/target-xtensa/cpu-qom.h +++ b/target-xtensa/cpu-qom.h @@ -81,5 +81,7 @@ static inline XtensaCPU *xtensa_env_get_cpu(const CPUXtensaState *env) #define ENV_OFFSET offsetof(XtensaCPU, env) void xtensa_cpu_do_interrupt(CPUState *cpu); +void xtensa_cpu_dump_state(CPUState *cpu, FILE *f, + fprintf_function cpu_fprintf, int flags); #endif diff --git a/target-xtensa/cpu.c b/target-xtensa/cpu.c index 6e93dd8d24..b5df321763 100644 --- a/target-xtensa/cpu.c +++ b/target-xtensa/cpu.c @@ -102,6 +102,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) cc->reset = xtensa_cpu_reset; cc->do_interrupt = xtensa_cpu_do_interrupt; + cc->dump_state = xtensa_cpu_dump_state; dc->vmsd = &vmstate_xtensa_cpu; } diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index 1037101f2e..4c41de0668 100644 --- a/target-xtensa/op_helper.c +++ b/target-xtensa/op_helper.c @@ -368,7 +368,9 @@ void HELPER(wsr_lend)(CPUXtensaState *env, uint32_t v) void HELPER(dump_state)(CPUXtensaState *env) { - cpu_dump_state(env, stderr, fprintf, 0); + XtensaCPU *cpu = xtensa_env_get_cpu(env); + + cpu_dump_state(CPU(cpu), stderr, fprintf, 0); } void HELPER(waiti)(CPUXtensaState *env, uint32_t pc, uint32_t intlevel) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 06d68dbaeb..dcb90a54a8 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/translate.c @@ -3014,9 +3014,11 @@ void gen_intermediate_code_pc(CPUXtensaState *env, TranslationBlock *tb) gen_intermediate_code_internal(env, tb, 1); } -void cpu_dump_state(CPUXtensaState *env, FILE *f, fprintf_function cpu_fprintf, - int flags) +void xtensa_cpu_dump_state(CPUState *cs, FILE *f, + fprintf_function cpu_fprintf, int flags) { + XtensaCPU *cpu = XTENSA_CPU(cs); + CPUXtensaState *env = &cpu->env; int i, j; cpu_fprintf(f, "PC=%08x\n\n", env->pc); |