diff --git a/test/backtrace.c b/test/backtrace.c new file mode 100644 index 0000000..b5b7491 --- /dev/null +++ b/test/backtrace.c @@ -0,0 +1,19 @@ +#include "ucore_backtrace.h" + +//note , compiling this without -rdynamic does not +//translate addresses to function names. Use the addr2line in that case +void func2(void) +{ + uc_backtrace_fd(2); +} + +void func1(void) +{ + func2(); +} + +int main(int argc, char *argv[]) +{ + func1(); + return; +}