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>
This commit is contained in:
Peter Maydell 2016-07-18 18:12:24 +01:00 committed by Riku Voipio
parent ce9c139d93
commit 0cb581d6bd
3 changed files with 120 additions and 0 deletions

View file

@ -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) {