summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-11-21 18:04:34 -0500
committerBen Gamari <ben@smart-cactus.org>2017-11-21 20:19:07 -0500
commit763ecacd3d4b0e9fcd4a8053a38722f89b488981 (patch)
treec974b93f30278a28e7ad94852adbf083a5d08f32 /includes
parent2ca2259925cfef1a4b3cbcf8b0ce291064c5280f (diff)
downloadhaskell-763ecacd3d4b0e9fcd4a8053a38722f89b488981.tar.gz
rts: Move libdwPrintBacktrace to public interface
Reviewers: erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4194
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Libdw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/rts/Libdw.h b/includes/rts/Libdw.h
index 391847552e..d7bd55d06e 100644
--- a/includes/rts/Libdw.h
+++ b/includes/rts/Libdw.h
@@ -8,6 +8,9 @@
#pragma once
+// for FILE
+#include <stdio.h>
+
// Chunk capacity
// This is rather arbitrary
#define BACKTRACE_CHUNK_SZ 256
@@ -89,3 +92,6 @@ Backtrace *libdwGetBacktrace(LibdwSession *session);
/* Lookup Location information for the given address.
* Returns 0 if successful, 1 if address could not be found. */
int libdwLookupLocation(LibdwSession *session, Location *loc, StgPtr pc);
+
+/* Pretty-print a backtrace to the given FILE */
+void libdwPrintBacktrace(LibdwSession *session, FILE *file, Backtrace *bt);