Free Electron
backtrace.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __platform_backtrace_h__
8 #define __platform_backtrace_h__
9 
10 /**************************************************************************//**
11  @brief Get the program stack
12 
13  The default @em skip of 2 will hide the calls to
14  feSegvHandler and feLogBacktrace.
15 *//***************************************************************************/
16 FE_DL_PUBLIC fe::String feGenerateBacktrace(U32 skip=2);
17 
18 /**************************************************************************//**
19  @brief Dump the program stack
20 *//***************************************************************************/
21 FE_DL_PUBLIC void feLogBacktrace(U32 skip=2);
22 
23 /**************************************************************************//**
24  @brief Start debugger if env FE_SEGV_ATTACH is 1
25 *//***************************************************************************/
26 FE_DL_PUBLIC void feAttachDebugger(void);
27 
28 /**************************************************************************//**
29  @brief Register a built-in handler for SIGSEGV
30 *//***************************************************************************/
31 FE_DL_PUBLIC void feRegisterSegvHandler(void);
32 
33 #endif /* __platform_backtrace_h__ */
FE_DL_PUBLIC fe::String feGenerateBacktrace(U32 skip=2)
Get the program stack.
Definition: backtrace.cc:269
FE_DL_PUBLIC void feRegisterSegvHandler(void)
Register a built-in handler for SIGSEGV.
Definition: backtrace.cc:284
Automatically reference-counted string container.
Definition: String.h:128
FE_DL_PUBLIC void feLogBacktrace(U32 skip=2)
Dump the program stack.
Definition: backtrace.cc:274
FE_DL_PUBLIC void feAttachDebugger(void)
Start debugger if env FE_SEGV_ATTACH is 1.
Definition: backtrace.cc:279