tor  master
Macros | Functions
backtrace.c File Reference

Functions to produce backtraces on bugs, crashes, or assertion failures. More...

#include "orconfig.h"
#include "compat.h"
#include "util.h"
#include "torlog.h"
#include "backtrace.h"
Include dependency graph for backtrace.c:

Functions

void log_backtrace (int severity, int domain, const char *msg)
 
int configure_backtrace_handler (const char *tor_version)
 
void clean_up_backtrace_handler (void)
 

Detailed Description

Functions to produce backtraces on bugs, crashes, or assertion failures.

Currently, we've only got an implementation here using the backtrace() family of functions, which are sometimes provided by libc and sometimes provided by libexecinfo. We tie into the sigaction() backend in order to detect crashes.

Function Documentation

◆ clean_up_backtrace_handler()

void clean_up_backtrace_handler ( void  )

Perform end-of-process cleanup for code that generates error messages on crashes.

◆ configure_backtrace_handler()

int configure_backtrace_handler ( const char *  tor_version)

Set up code to handle generating error messages on crashes.

Here is the caller graph for this function: