Commit f93732914e0b06539170e84f046f01ebe99980f3

Authored by j_mayer
1 parent 29f640e2

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
Showing 1 changed file with 9 additions and 1 deletions
... ... @@ -1301,11 +1301,19 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
1301 1301 #else
1302 1302 cpu_dump_state(env, stderr, fprintf, 0);
1303 1303 #endif
1304   - va_end(ap);
1305 1304 if (logfile) {
  1305 + fprintf(logfile, "qemu: fatal: ");
  1306 + vfprintf(logfile, fmt, ap);
  1307 + fprintf(logfile, "\n");
  1308 +#ifdef TARGET_I386
  1309 + cpu_dump_state(env, logfile, fprintf, X86_DUMP_FPU | X86_DUMP_CCOP);
  1310 +#else
  1311 + cpu_dump_state(env, logfile, fprintf, 0);
  1312 +#endif
1306 1313 fflush(logfile);
1307 1314 fclose(logfile);
1308 1315 }
  1316 + va_end(ap);
1309 1317 abort();
1310 1318 }
1311 1319  
... ...