From 302cf02757abb99ab7744af38a5dc3015804a2e8 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Wed, 29 Aug 2018 18:09:57 +0200 Subject: [PATCH] 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. --- strace.c | 5 +++++ 1 file changed, 5 insertions(+) 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 } } -- 2.40.0