From: Eugene Syromyatnikov Date: Wed, 29 Aug 2018 16:09:57 +0000 (+0200) Subject: Print stack traces on signals X-Git-Tag: v4.25~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=302cf02757abb99ab7744af38a5dc3015804a2e8;p=strace Print stack traces on signals I don't know why it hasn't been done earlier. * strace.c (print_stopped) [ENABLE_STACKTRACE]: Call unwind_tcb_print if stack trace printing is enabled. --- diff --git a/strace.c b/strace.c index 6d70d20c..62142d86 100644 --- a/strace.c +++ b/strace.c @@ -2168,6 +2168,11 @@ print_stopped(struct tcb *tcp, const siginfo_t *si, const unsigned int sig) } else tprintf("--- stopped by %s ---\n", signame(sig)); line_ended(); + +#ifdef ENABLE_STACKTRACE + if (stack_trace_enabled) + unwind_tcb_print(tcp); +#endif } }