Prefer libunwind to libbacktrace

This commit is contained in:
Chris Lee
2018-05-31 06:34:02 +00:00
parent ec5bda6ddf
commit 1c2a12eb05
4 changed files with 314 additions and 48 deletions

20
src/util/bt.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef BT_H
#define BT_H
#include <sys/types.h>
#define BT_FRAME_SIZE 64
#define BT_MAX_FRAMES 64
struct backtrace_frame {
char name[BT_FRAME_SIZE];
};
struct backtrace {
struct backtrace_frame frames[BT_MAX_FRAMES];
size_t frame_count;
};
void get_backtrace(struct backtrace *bt, int skip);
#endif // BT_H