From 205096fe4def68edef78e1412d0f42790d7ddfa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Wed, 31 Oct 2012 21:55:19 +0100 Subject: [PATCH] Added backtrace.c in test/ --- test/backtrace.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/backtrace.c 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; +}