aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 12:18:20 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-29 12:18:20 +0000
commitf93732914e0b06539170e84f046f01ebe99980f3 (patch)
tree94d8a4266f11b8fa4815ab3c46ef4963c7708ff2 /exec.c
parent29f640e2cfe4d7da114482fd8de257a27274288d (diff)
make cpu_abort dump cpu state in logfile, which is useful for debugging.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3260 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 7d8ae3fd98..0c0b6542eb 100644
--- a/exec.c
+++ b/exec.c
@@ -1301,11 +1301,19 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
#else
cpu_dump_state(env, stderr, fprintf, 0);
#endif
- va_end(ap);
if (logfile) {
+ fprintf(logfile, "qemu: fatal: ");
+ vfprintf(logfile, fmt, ap);
+ fprintf(logfile, "\n");
+#ifdef TARGET_I386
+ cpu_dump_state(env, logfile, fprintf, X86_DUMP_FPU | X86_DUMP_CCOP);
+#else
+ cpu_dump_state(env, logfile, fprintf, 0);
+#endif
fflush(logfile);
fclose(logfile);
}
+ va_end(ap);
abort();
}