Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::port::StackTrace Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

ion::port::StackTrace::StackTrace ( )

Definition at line 42 of file stacktrace.cc.

ion::port::StackTrace::~StackTrace ( )
inline

Definition at line 36 of file stacktrace.h.

Member Function Documentation

const std::vector<void*>& ion::port::StackTrace::GetAddresses ( ) const
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().


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