rts: Print message before SIGUSR2 backtrace
authorBen Gamari <bgamari.foss@gmail.com>
Wed, 13 Sep 2017 12:21:20 +0000 (08:21 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 13 Sep 2017 14:39:56 +0000 (10:39 -0400)
Reviewers: austin, erikd, simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3942

rts/posix/Signals.c

index 7471948..6b72890 100644 (file)
@@ -539,6 +539,7 @@ backtrace_handler(int sig STG_UNUSED)
 #if USE_LIBDW
     LibdwSession *session = libdwInit();
     Backtrace *bt = libdwGetBacktrace(session);
+    fprintf(stderr, "\nCaught SIGUSR2; Backtrace:\n");
     libdwPrintBacktrace(session, stderr, bt);
     backtraceFree(bt);
     libdwFree(session);