diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 3 | ||||
-rw-r--r-- | linux-user/signal.c | 12 |
2 files changed, 6 insertions, 9 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 49108b81d3..d0e0e4fc6a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1306,8 +1306,9 @@ do { \ fprintf(stderr, fmt , ## __VA_ARGS__); \ cpu_dump_state(env, stderr, fprintf, 0); \ qemu_log(fmt, ## __VA_ARGS__); \ - if (logfile) \ + if (qemu_log_enabled()) { \ log_cpu_state(env, 0); \ + } \ } while (0) static int do_store_exclusive(CPUPPCState *env) diff --git a/linux-user/signal.c b/linux-user/signal.c index b1e139d6fd..43346dcbcc 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4378,8 +4378,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, sigsegv: unlock_user_struct(frame, frame_addr, 1); - if (logfile) - fprintf (logfile, "segfaulting from setup_frame\n"); + qemu_log("segfaulting from setup_frame\n"); force_sig(TARGET_SIGSEGV); } @@ -4447,8 +4446,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, sigsegv: unlock_user_struct(rt_sf, rt_sf_addr, 1); - if (logfile) - fprintf (logfile, "segfaulting from setup_rt_frame\n"); + qemu_log("segfaulting from setup_rt_frame\n"); force_sig(TARGET_SIGSEGV); } @@ -4489,8 +4487,7 @@ long do_sigreturn(CPUPPCState *env) sigsegv: unlock_user_struct(sr, sr_addr, 1); unlock_user_struct(sc, sc_addr, 1); - if (logfile) - fprintf (logfile, "segfaulting from do_sigreturn\n"); + qemu_log("segfaulting from do_sigreturn\n"); force_sig(TARGET_SIGSEGV); return 0; } @@ -4552,8 +4549,7 @@ long do_rt_sigreturn(CPUPPCState *env) sigsegv: unlock_user_struct(rt_sf, rt_sf_addr, 1); - if (logfile) - fprintf (logfile, "segfaulting from do_rt_sigreturn\n"); + qemu_log("segfaulting from do_rt_sigreturn\n"); force_sig(TARGET_SIGSEGV); return 0; } |