Commit 763ecacd authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

rts: Move libdwPrintBacktrace to public interface

Reviewers: erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D4194
parent 2ca22599
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#pragma once #pragma once
// for FILE
#include <stdio.h>
// Chunk capacity // Chunk capacity
// This is rather arbitrary // This is rather arbitrary
#define BACKTRACE_CHUNK_SZ 256 #define BACKTRACE_CHUNK_SZ 256
...@@ -89,3 +92,6 @@ Backtrace *libdwGetBacktrace(LibdwSession *session); ...@@ -89,3 +92,6 @@ Backtrace *libdwGetBacktrace(LibdwSession *session);
/* Lookup Location information for the given address. /* Lookup Location information for the given address.
* Returns 0 if successful, 1 if address could not be found. */ * Returns 0 if successful, 1 if address could not be found. */
int libdwLookupLocation(LibdwSession *session, Location *loc, StgPtr pc); int libdwLookupLocation(LibdwSession *session, Location *loc, StgPtr pc);
/* Pretty-print a backtrace to the given FILE */
void libdwPrintBacktrace(LibdwSession *session, FILE *file, Backtrace *bt);
...@@ -23,9 +23,6 @@ LibdwSession *libdwInit(void); ...@@ -23,9 +23,6 @@ LibdwSession *libdwInit(void);
/* Free a session */ /* Free a session */
void libdwFree(LibdwSession *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 // Traverse backtrace in order of outer-most to inner-most frame
#define FOREACH_FRAME_INWARDS(pc, bt) \ #define FOREACH_FRAME_INWARDS(pc, bt) \
BacktraceChunk *_chunk; \ BacktraceChunk *_chunk; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment