]> Git Repo - qemu.git/commitdiff
Avoid SIGSEGV when dumping cpu state without enabled logging
authormalc <[email protected]>
Wed, 15 Jul 2009 16:52:47 +0000 (20:52 +0400)
committermalc <[email protected]>
Wed, 15 Jul 2009 17:03:34 +0000 (21:03 +0400)
Signed-off-by: malc <[email protected]>
linux-user/main.c

index e331d658fbf67075bbec4b8a0a3e25b165ea8ae2..1e95f02124a48baf398910616ea1ada5fa699536 100644 (file)
@@ -1053,7 +1053,8 @@ do {                                                                    \
     fprintf(stderr, fmt , ## __VA_ARGS__);                              \
     cpu_dump_state(env, stderr, fprintf, 0);                            \
     qemu_log(fmt, ## __VA_ARGS__);                                      \
-    log_cpu_state(env, 0);                                              \
+    if (logfile)                                                        \
+        log_cpu_state(env, 0);                                          \
 } while (0)
 
 void cpu_loop(CPUPPCState *env)
This page took 0.032359 seconds and 4 git commands to generate.