diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-10 15:44:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-10 15:44:52 -0400 |
commit | cc9e86db61e2ffb6c54b09e8c41e8fdad50b3ef3 (patch) | |
tree | 14a025fd59522d8c2baac100764d8a664756b587 /src/common/backtrace.h | |
parent | 196895ed7ed1bd4c93c4c3cdd12893cfa4e4cc41 (diff) | |
download | tor-cc9e86db61e2ffb6c54b09e8c41e8fdad50b3ef3.tar.gz tor-cc9e86db61e2ffb6c54b09e8c41e8fdad50b3ef3.zip |
Log a backtrace when the sandbox finds a failure
This involves some duplicate code between backtrace.c and sandbox.c,
but I don't see a way around it: calling more functions would mean
adding more steps to our call stack, and running clean_backtrace()
against the wrong point on the stack.
Diffstat (limited to 'src/common/backtrace.h')
-rw-r--r-- | src/common/backtrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/backtrace.h b/src/common/backtrace.h index 765436fee3..b1df281659 100644 --- a/src/common/backtrace.h +++ b/src/common/backtrace.h @@ -4,9 +4,15 @@ #ifndef TOR_BACKTRACE_H #define TOR_BACKTRACE_H +#include "orconfig.h" + void log_backtrace(int severity, int domain, const char *msg); int configure_backtrace_handler(const char *tor_version); void clean_up_backtrace_handler(void); +#ifdef EXPOSE_CLEAN_BACKTRACE +void clean_backtrace(void **stack, int depth, const ucontext_t *ctx); +#endif + #endif |