From eca1bdf415c454093dfc7eb983cd49287c043967 Mon Sep 17 00:00:00 2001 From: aliguori Date: Mon, 26 Jan 2009 19:54:31 +0000 Subject: Log reset events (Jan Kiszka) Original idea&code by Kevin Wolf, split-up in two patches and added more archs. This patch introduces a flag to log CPU resets. Useful for tracing unexpected resets (such as those triggered by x86 triple faults). Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6452 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-m68k/helper.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target-m68k') diff --git a/target-m68k/helper.c b/target-m68k/helper.c index ce56693..076ea35 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -143,6 +143,11 @@ static int cpu_m68k_set_model(CPUM68KState *env, const char *name) void cpu_reset(CPUM68KState *env) { + if (qemu_loglevel_mask(CPU_LOG_RESET)) { + qemu_log("CPU Reset (CPU %d)\n", env->cpu_index); + log_cpu_state(env, 0); + } + memset(env, 0, offsetof(CPUM68KState, breakpoints)); #if !defined (CONFIG_USER_ONLY) env->sr = 0x2700; -- cgit v1.1