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