#include <cstdio>
#include <unistd.h>
#include <stdarg.h>
+#include <execinfo.h>
#ifdef LOG_SYSLOG
}
+/**
+ * Print a backtrace
+ */
+void Backtrace(int size)
+{
+ void * buffer[100];
+ int actual_size = backtrace(buffer, size);
+ backtrace_symbols_fd(buffer, actual_size, fileno(stderr));
+}
+