2017-03-15 21:13:17 +01:00
|
|
|
/* Copyright (c) 2013-2017, 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)
|
2015-12-15 16:30:04 +01:00
|
|
|
void clean_backtrace(void **stack, size_t depth, const ucontext_t *ctx);
|
2014-04-10 21:44:52 +02:00
|
|
|
#endif
|
2017-09-15 22:24:44 +02:00
|
|
|
#endif /* defined(EXPOSE_CLEAN_BACKTRACE) */
|
2014-04-10 21:44:52 +02:00
|
|
|
|
2017-09-15 22:24:44 +02:00
|
|
|
#endif /* !defined(TOR_BACKTRACE_H) */
|
2013-07-19 20:09:58 +02:00
|
|
|
|