strace/Print-stack-traces-on-signals.patch
2019-09-30 11:17:43 -04:00

33 lines
809 B
Diff

From 302cf02757abb99ab7744af38a5dc3015804a2e8 Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Wed, 29 Aug 2018 18:09:57 +0200
Subject: [PATCH 074/293] 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 6d70d20..62142d8 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
}
}
--
1.7.12.4