[commit: ghc] master: rts: Move libdwPrintBacktrace to public interface (763ecac)
git at git.haskell.org
git at git.haskell.org
Wed Nov 22 02:11:35 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/763ecacd3d4b0e9fcd4a8053a38722f89b488981/ghc
>---------------------------------------------------------------
commit 763ecacd3d4b0e9fcd4a8053a38722f89b488981
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Nov 21 18:04:34 2017 -0500
rts: Move libdwPrintBacktrace to public interface
Reviewers: erikd, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4194
>---------------------------------------------------------------
763ecacd3d4b0e9fcd4a8053a38722f89b488981
includes/rts/Libdw.h | 6 ++++++
rts/Libdw.h | 3 ---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/includes/rts/Libdw.h b/includes/rts/Libdw.h
index 3918475..d7bd55d 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);
diff --git a/rts/Libdw.h b/rts/Libdw.h
index d737745..5fd1c95 100644
--- a/rts/Libdw.h
+++ b/rts/Libdw.h
@@ -23,9 +23,6 @@ LibdwSession *libdwInit(void);
/* Free a session */
void libdwFree(LibdwSession *session);
-/* Pretty-print a backtrace to std*/
-void libdwPrintBacktrace(LibdwSession *session, FILE *file, Backtrace *bt);
-
// Traverse backtrace in order of outer-most to inner-most frame
#define FOREACH_FRAME_INWARDS(pc, bt) \
BacktraceChunk *_chunk; \
More information about the ghc-commits
mailing list