Added backtrace.c in test/

This commit is contained in:
Nils O. Selåsdal
2012-10-31 21:55:19 +01:00
parent f2402012e1
commit 205096fe4d
+19
View File
@@ -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;
}