git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some sort of vague ipython analysis
[ipdf/code.git]
/
src
/
log.cpp
diff --git
a/src/log.cpp
b/src/log.cpp
index
3af4aca
..
49b209a
100644
(file)
--- a/
src/log.cpp
+++ b/
src/log.cpp
@@
-10,6
+10,7
@@
#include <cstdio>
#include <unistd.h>
#include <stdarg.h>
#include <cstdio>
#include <unistd.h>
#include <stdarg.h>
+#include <execinfo.h>
#ifdef LOG_SYSLOG
#ifdef LOG_SYSLOG
@@
-139,3
+140,13
@@
void FatalEx(const char * funct, const char * file, int line, ...)
}
}
+/**
+ * Print a backtrace
+ */
+void Backtrace(int size)
+{
+ void * buffer[100];
+ int actual_size = backtrace(buffer, size);
+ backtrace_symbols_fd(buffer, actual_size, fileno(stderr));
+}
+
UCC
git Repository :: git.ucc.asn.au