summaryrefslogtreecommitdiffstats
path: root/target-sparc/helper.c
diff options
context:
space:
mode:
authoraliguori2009-01-26 20:54:31 +0100
committeraliguori2009-01-26 20:54:31 +0100
commiteca1bdf415c454093dfc7eb983cd49287c043967 (patch)
tree70920f4f7827b7f6a8bc1b52366b0d968ba88cd0 /target-sparc/helper.c
parentRemove the advertising clause from the slirp license (diff)
downloadqemu-eca1bdf415c454093dfc7eb983cd49287c043967.tar.gz
qemu-eca1bdf415c454093dfc7eb983cd49287c043967.tar.xz
qemu-eca1bdf415c454093dfc7eb983cd49287c043967.zip
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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6452 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r--target-sparc/helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index d34b837637..a275880851 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -639,6 +639,11 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
void cpu_reset(CPUSPARCState *env)
{
+ if (qemu_loglevel_mask(CPU_LOG_RESET)) {
+ qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);
+ log_cpu_state(env, 0);
+ }
+
tlb_flush(env, 1);
env->cwp = 0;
env->wim = 1;