Macros | Typedefs | Functions
backtrace.h File Reference

Header for backtrace.c. More...

#include "orconfig.h"
#include "lib/cc/compat_compiler.h"
#include "lib/cc/torint.h"
#include "lib/defs/logging_types.h"

Go to the source code of this file.


#define log_backtrace(sev, dom, msg)    log_backtrace_impl((sev), (dom), (msg), tor_log)


typedef void(* tor_log_fn) (int, log_domain_mask_t, const char *fmt,...)


void log_backtrace_impl (int severity, log_domain_mask_t domain, const char *msg, tor_log_fn logger)
int configure_backtrace_handler (const char *tor_version)
void clean_up_backtrace_handler (void)
void dump_stack_symbols_to_error_fds (void)
const char * get_tor_backtrace_version (void)

Detailed Description

Header for backtrace.c.

Definition in file backtrace.h.

Macro Definition Documentation

◆ log_backtrace

#define log_backtrace (   sev,
)     log_backtrace_impl((sev), (dom), (msg), tor_log)

Definition at line 29 of file backtrace.h.

Typedef Documentation

◆ tor_log_fn

typedef void(* tor_log_fn) (int, log_domain_mask_t, const char *fmt,...)

Definition at line 18 of file backtrace.h.

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.

Definition at line 359 of file backtrace.c.

◆ configure_backtrace_handler()

int configure_backtrace_handler ( const char *  tor_version)

Set up code to handle generating error messages on crashes.

Definition at line 330 of file backtrace.c.

◆ dump_stack_symbols_to_error_fds()

void dump_stack_symbols_to_error_fds ( void  )

Definition at line 315 of file backtrace.c.

◆ get_tor_backtrace_version()

const char * get_tor_backtrace_version ( void  )

Return the tor version used for error messages on crashes. Signal-safe: returns a pointer to a static array.

Definition at line 323 of file backtrace.c.

Referenced by tor_raw_assertion_failed_msg_().

◆ log_backtrace_impl()

void log_backtrace_impl ( int  severity,
log_domain_mask_t  domain,
const char *  msg,
tor_log_fn  logger 

Definition at line 296 of file backtrace.c.