cpu_abort()
[qemu] / exec.c
diff --git a/exec.c b/exec.c
index 2e84f55..79c2bd0 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -70,7 +70,7 @@ unsigned long host_page_mask;
 
 static PageDesc *l1_map[L1_SIZE];
 
-void page_init(void)
+static void page_init(void)
 {
     /* NOTE: we can always suppose that host_page_size >=
        TARGET_PAGE_SIZE */
@@ -190,10 +190,11 @@ void page_set_flags(unsigned long start, unsigned long end, int flags)
     spin_unlock(&tb_lock);
 }
 
-void cpu_x86_tblocks_init(void)
+void cpu_exec_init(void)
 {
     if (!code_gen_ptr) {
         code_gen_ptr = code_gen_buffer;
+        page_init();
     }
 }
 
@@ -562,3 +563,19 @@ TranslationBlock *tb_find_pc(unsigned long tc_ptr)
     } 
     return &tbs[m_max];
 }
+
+void cpu_abort(CPUState *env, const char *fmt, ...)
+{
+    va_list ap;
+
+    va_start(ap, fmt);
+    fprintf(stderr, "qemu: fatal: ");
+    vfprintf(stderr, fmt, ap);
+    fprintf(stderr, "\n");
+#ifdef TARGET_I386
+    cpu_x86_dump_state(env, stderr, X86_DUMP_FPU | X86_DUMP_CCOP);
+#endif
+    va_end(ap);
+    abort();
+}
+