diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-10-23 09:15:20 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-23 15:40:37 +0100 |
commit | 36b213903db2363c2153f93c78bce079083f3d68 (patch) | |
tree | e019546b932384af9f91abf756c1db7287bb9bf0 /rts/Libdw.c | |
parent | 70ee6389ca6be37f369395f100e609e9f16a7200 (diff) | |
download | haskell-36b213903db2363c2153f93c78bce079083f3d68.tar.gz |
rts: Expose more libdw symbols
Diffstat (limited to 'rts/Libdw.c')
-rw-r--r-- | rts/Libdw.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/rts/Libdw.c b/rts/Libdw.c index 61fefbd9b9..1ef51b2444 100644 --- a/rts/Libdw.c +++ b/rts/Libdw.c @@ -6,16 +6,16 @@ * * --------------------------------------------------------------------------*/ +#include "Rts.h" +#include "RtsUtils.h" +#include "Libdw.h" + #ifdef USE_LIBDW #include <elfutils/libdwfl.h> #include <dwarf.h> #include <unistd.h> -#include "Rts.h" -#include "Libdw.h" -#include "RtsUtils.h" - static BacktraceChunk *backtraceAllocChunk(BacktraceChunk *next) { BacktraceChunk *chunk = stgMallocBytes(sizeof(BacktraceChunk), "backtraceAllocChunk"); @@ -329,4 +329,18 @@ static const Dwfl_Thread_Callbacks thread_cbs = { .set_initial_registers = set_initial_registers, }; +#else /* !USE_LIBDW */ + +void backtraceFree(Backtrace *bt STG_UNUSED) { } + +Backtrace *libdwGetBacktrace(LibdwSession *session STG_UNUSED) { + return NULL; +} + +int libdwLookupLocation(LibdwSession *session STG_UNUSED, + Location *loc STG_UNUSED, + StgPtr pc STG_UNUSED) { + return 1; +} + #endif /* USE_LIBDW */ |