Commit 7501267e2210788f548edd8adf1704731b235d3f
1 parent
13b55754
cpu_abort()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@253 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
16 additions
and
0 deletions
exec.c
| @@ -563,3 +563,19 @@ TranslationBlock *tb_find_pc(unsigned long tc_ptr) | @@ -563,3 +563,19 @@ TranslationBlock *tb_find_pc(unsigned long tc_ptr) | ||
| 563 | } | 563 | } |
| 564 | return &tbs[m_max]; | 564 | return &tbs[m_max]; |
| 565 | } | 565 | } |
| 566 | + | ||
| 567 | +void cpu_abort(CPUState *env, const char *fmt, ...) | ||
| 568 | +{ | ||
| 569 | + va_list ap; | ||
| 570 | + | ||
| 571 | + va_start(ap, fmt); | ||
| 572 | + fprintf(stderr, "qemu: fatal: "); | ||
| 573 | + vfprintf(stderr, fmt, ap); | ||
| 574 | + fprintf(stderr, "\n"); | ||
| 575 | +#ifdef TARGET_I386 | ||
| 576 | + cpu_x86_dump_state(env, stderr, X86_DUMP_FPU | X86_DUMP_CCOP); | ||
| 577 | +#endif | ||
| 578 | + va_end(ap); | ||
| 579 | + abort(); | ||
| 580 | +} | ||
| 581 | + |