2015-01-02 14:27:39 -05:00
|
|
|
/* Copyright (c) 2013-2015, The Tor Project, Inc. */
|
2013-07-19 14:09:58 -04:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
#ifndef TOR_BACKTRACE_H
|
|
|
|
#define TOR_BACKTRACE_H
|
|
|
|
|
2014-04-10 15:44:52 -04:00
|
|
|
#include "orconfig.h"
|
|
|
|
|
2013-07-26 13:22:56 +02:00
|
|
|
void log_backtrace(int severity, int domain, const char *msg);
|
2013-07-19 22:47:49 -04:00
|
|
|
int configure_backtrace_handler(const char *tor_version);
|
2013-07-19 14:09:58 -04:00
|
|
|
void clean_up_backtrace_handler(void);
|
|
|
|
|
2014-04-10 15:44:52 -04:00
|
|
|
#ifdef EXPOSE_CLEAN_BACKTRACE
|
2014-04-16 22:00:13 -04:00
|
|
|
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
|
|
|
|
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
|
2014-04-10 15:44:52 -04:00
|
|
|
void clean_backtrace(void **stack, int depth, const ucontext_t *ctx);
|
|
|
|
#endif
|
2014-04-16 22:00:13 -04:00
|
|
|
#endif
|
2014-04-10 15:44:52 -04:00
|
|
|
|
2013-07-19 14:09:58 -04:00
|
|
|
#endif
|
|
|
|
|