Initial import of libucore

This commit is contained in:
Nils O. Selåsdal
2012-10-29 23:07:32 +01:00
commit ed3866e49a
79 changed files with 6181 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#include <execinfo.h>
#define MAX_BACKTRACE_SYMBOLS 96
void uc_backtrace_fd(int fd)
{
void *buffer[MAX_BACKTRACE_SYMBOLS];
int ptrs;
ptrs = backtrace(buffer, MAX_BACKTRACE_SYMBOLS);
backtrace_symbols_fd(buffer, ptrs, fd);
}