aboutsummaryrefslogtreecommitdiff
path: root/linux-user/signal.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-18 18:12:24 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-09-21 14:25:59 +0300
commit0cb581d6bdc5aa808ae1a9789d02657fe531cb39 (patch)
treeaf887432d58b74e680b738bc7190810710f05431 /linux-user/signal.c
parentce9c139d93db03e464341385976606b7568b768f (diff)
linux-user: report signals being taken in strace output
Native strace reports when the process being traced takes a signal: --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} --- Report something similar when QEMU is doing its internal strace of the guest process and is about to deliver it a signal. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r--linux-user/signal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index d3ac0e2565..3337f1e563 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -5849,6 +5849,10 @@ static void handle_pending_signal(CPUArchState *cpu_env, int sig,
handler = sa->_sa_handler;
}
+ if (do_strace) {
+ print_taken_signal(sig, &k->info);
+ }
+
if (handler == TARGET_SIG_DFL) {
/* default handler : ignore some signal. The other are job control or fatal */
if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) {