Ion
|
StackTrace acquires a stack trace for the current thread (not suitable for calling in an interrupt handler) on construction and supports conversion of raw stack pointers to a string of symbolic function names. More...
#include "stacktrace.h"
Public Member Functions | |
StackTrace () | |
~StackTrace () | |
const std::vector< void * > & | GetAddresses () const |
Returns the stack as a vector of addresses. More... | |
const std::vector< std::string > & | GetSymbols () const |
Returns the stack as a vector of symbol names. More... | |
const std::string | GetSymbolString () const |
Returns formatted string containing symbolic function names for elements of the stack trace. More... | |
StackTrace acquires a stack trace for the current thread (not suitable for calling in an interrupt handler) on construction and supports conversion of raw stack pointers to a string of symbolic function names.
Currently supports mac, ios, linux, and windows platforms. Unsupported platforms will produce an empty stack.
Definition at line 33 of file stacktrace.h.
ion::port::StackTrace::StackTrace | ( | ) |
Definition at line 42 of file stacktrace.cc.
|
inline |
Definition at line 36 of file stacktrace.h.
|
inline |
Returns the stack as a vector of addresses.
Definition at line 38 of file stacktrace.h.
Referenced by GetSymbolString().
const std::vector< std::string > & ion::port::StackTrace::GetSymbols | ( | ) | const |
Returns the stack as a vector of symbol names.
Definition at line 115 of file stacktrace.cc.
Referenced by GetSymbolString().
const std::string ion::port::StackTrace::GetSymbolString | ( | ) | const |
Returns formatted string containing symbolic function names for elements of the stack trace.
Definition at line 121 of file stacktrace.cc.
References GetAddresses(), and GetSymbols().