CppCMS
Public Member Functions | Static Public Attributes | List of all members
booster::backtrace Class Reference

the class that records the stack trace when it is created, More...

#include <booster/booster/backtrace.h>

Inheritance diagram for booster::backtrace:
booster::bad_cast booster::domain_error booster::exception booster::invalid_argument booster::length_error booster::logic_error booster::out_of_range booster::overflow_error booster::range_error booster::runtime_error booster::underflow_error

Public Member Functions

 backtrace (size_t frames_no=default_stack_size)
 
size_t stack_size () const
 
void * return_address (unsigned frame_no) const
 
void trace_line (unsigned frame_no, std::ostream &out) const
 
std::string trace_line (unsigned frame_no) const
 
std::string trace () const
 
void trace (std::ostream &out) const
 

Static Public Attributes

static size_t const default_stack_size = 32
 

Detailed Description

the class that records the stack trace when it is created,

It is a base class for all exceptions that record stack trace

Constructor & Destructor Documentation

booster::backtrace::backtrace ( size_t  frames_no = default_stack_size)
inline

Create stack trace recording at most frames_no stack frames

References booster::stack_trace::trace().

Member Function Documentation

void* booster::backtrace::return_address ( unsigned  frame_no) const
inline

Get the returned address for the stack frame number frame_no

size_t booster::backtrace::stack_size ( ) const
inline

Get the actual number of recorded stack frames

std::string booster::backtrace::trace ( ) const
inline

Get full stack trace as a string

References booster::stack_trace::get_symbols().

void booster::backtrace::trace ( std::ostream &  out) const
inline

Print full stack trace to a stream out

References booster::stack_trace::write_symbols().

void booster::backtrace::trace_line ( unsigned  frame_no,
std::ostream &  out 
) const
inline

Print the stack trace frame for the frame frame_no to the stream out

References booster::stack_trace::write_symbols().

std::string booster::backtrace::trace_line ( unsigned  frame_no) const
inline

Get a readable stack trace frame for the frame frame_no

References booster::stack_trace::get_symbol().

Member Data Documentation

size_t const booster::backtrace::default_stack_size = 32
static

The default number of recorded frames


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