Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::common::app::StacktraceHelper Class Reference

Helper to print a strack trace on SIGSEGV and SIGABRT. More...

#include <app.hpp>

Detailed Description

Helper to print a strack trace on SIGSEGV and SIGABRT.

On construction this installs a handler for SIGSEGV and SIGABRT, which prints a stack trace. Note that signal handlers are global and therefore you can only use one StacktraceHelper in a app. It is probably a good idea to only include this in non-Release builds.

Example:

int main(int, char**) {
#ifndef NDEBUG
StacktraceHelper stacktrace;
#endif
// Do stuff...
return 0;
}
Helper to print a strack trace on SIGSEGV and SIGABRT.
Definition app.hpp:100

Definition at line 99 of file app.hpp.


The documentation for this class was generated from the following file: