aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-10 14:07:13 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-10 14:07:13 +0000
commit924edcae75a8b06c88896d998c9cb6c3160b7a55 (patch)
tree3d049a7ccbf37b012b48446cd086ee3c6a11aaee /exec.c
parent7a774c875b9995d9b40201f09a78efc73ad4c818 (diff)
Flush the debug log when qemu Aborts (patch by Herve Poussineau)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2971 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 0e415a5e9b..c782e5b6b2 100644
--- a/exec.c
+++ b/exec.c
@@ -1286,6 +1286,10 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
cpu_dump_state(env, stderr, fprintf, 0);
#endif
va_end(ap);
+ if (logfile) {
+ fflush(logfile);
+ fclose(logfile);
+ }
abort();
}