From d49190c4208f2c556c3a01962a81f8a85d522bb1 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sun, 24 May 2015 14:20:41 -0700 Subject: disas: Remove uses of CPU env disas does not need to access the CPU env for any reason. Change the APIs to accept CPU pointers instead. Small change pattern needs to be applied to all target translate.c. This brings us closer to making disas.o a common-obj and less architecture specific in general. Cc: Richard Henderson Cc: Peter Maydell Cc: "Edgar E. Iglesias" Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Michael Walle Cc: Aurelien Jarno Cc: Leon Alrae Cc: Jia Liu Cc: Alexander Graf Cc: Mark Cave-Ayland Cc: Bastian Koppelmann Cc: Guan Xuetao Cc: Max Filippov Reviewed-by: Richard Henderson Reviewed-by: Eduardo Habkost Signed-off-by: Peter Crosthwaite Acked-by: Luiz Capitulino Signed-off-by: Markus Armbruster --- include/disas/disas.h | 4 ++-- include/qemu/log.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/disas/disas.h b/include/disas/disas.h index c13ca9a..2b9293b 100644 --- a/include/disas/disas.h +++ b/include/disas/disas.h @@ -6,10 +6,10 @@ #ifdef NEED_CPU_H /* Disassemble this for me please... (debugging). */ void disas(FILE *out, void *code, unsigned long size); -void target_disas(FILE *out, CPUArchState *env, target_ulong code, +void target_disas(FILE *out, CPUState *cpu, target_ulong code, target_ulong size, int flags); -void monitor_disas(Monitor *mon, CPUArchState *env, +void monitor_disas(Monitor *mon, CPUState *cpu, target_ulong pc, int nb_insn, int is_physical, int flags); /* Look up symbol for debugging purpose. Returns "" if unknown. */ diff --git a/include/qemu/log.h b/include/qemu/log.h index 195f665..f880e66 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -104,10 +104,10 @@ static inline void log_cpu_state_mask(int mask, CPUState *cpu, int flags) #ifdef NEED_CPU_H /* disas() and target_disas() to qemu_logfile: */ -static inline void log_target_disas(CPUArchState *env, target_ulong start, +static inline void log_target_disas(CPUState *cpu, target_ulong start, target_ulong len, int flags) { - target_disas(qemu_logfile, env, start, len, flags); + target_disas(qemu_logfile, cpu, start, len, flags); } static inline void log_disas(void *code, unsigned long size) -- cgit v1.1