summaryrefslogtreecommitdiffstats
path: root/linux-user/signal.c
diff options
context:
space:
mode:
authorBlue Swirl2012-06-03 18:35:32 +0200
committerBlue Swirl2012-06-21 20:45:18 +0200
commiteeacee4d8652d7f3b9224cfe0707c0ed87cc0e96 (patch)
tree124da0ad9aa9593d6e3333ac0f9ef86a377491b6 /linux-user/signal.c
parentqemu-log: move logging to qemu-log.c (diff)
downloadqemu-eeacee4d8652d7f3b9224cfe0707c0ed87cc0e96.tar.gz
qemu-eeacee4d8652d7f3b9224cfe0707c0ed87cc0e96.tar.xz
qemu-eeacee4d8652d7f3b9224cfe0707c0ed87cc0e96.zip
qemu-log: cleanup
Don't use global variables directly but via accessor functions. Rename globals. Convert macros to functions, add GCC format attributes. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r--linux-user/signal.c12
1 files changed, 4 insertions, 8 deletions
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;
}