
#include <rutz/backtrace.h>
Collaboration diagram for rutz::backtrace:

Definition at line 49 of file backtrace.h.
Public Member Functions | |
| backtrace () throw () | |
| Default construct an empty call stack. | |
| backtrace (const backtrace &other) throw () | |
| Copy constructor. | |
| backtrace & | operator= (const backtrace &other) throw () |
| Assignment operator. | |
| ~backtrace () throw () | |
| Destructor. | |
| bool | push (rutz::prof *p) throw () |
| Push a new element onto the call stack. Returns true if successful. | |
| void | pop () throw () |
| Pop the most recent element off of the call stack. | |
| unsigned int | size () const throw () |
| Get the number of elements in the call stack. | |
| rutz::prof * | top () const throw () |
| Get the top stack frame, or null if the backtrace is empty. | |
| rutz::prof * | at (unsigned int i) const throw () |
| Will return a null pointer if i is out of range. | |
| rutz::prof * | operator[] (unsigned int i) const throw () |
| Shorthand for at(i). | |
| void | print () const throw () |
| Print the call stack on stderr. | |
| void | print (std::ostream &os) const throw () |
| Print the call stack to the given stream. | |
Static Public Member Functions | |
| static backtrace & | current () throw () |
| Access the current call stack. | |
|
|
Default construct an empty call stack.
Definition at line 70 of file backtrace.cc. |
|
|
Copy constructor.
Definition at line 74 of file backtrace.cc. |
|
|
Destructor.
Definition at line 84 of file backtrace.cc. |
|
|
Will return a null pointer if i is out of range.
Definition at line 134 of file backtrace.cc. References i. Referenced by operator[](). |
|
|
Access the current call stack.
Definition at line 87 of file backtrace.cc. References current_backtrace_key, current_backtrace_key_alloc(), current_backtrace_key_once, and GVX_ABORT. Referenced by rutz::debug::assert_aux(), rutz::debug::invariant_aux(), rutz::debug::panic_aux(), rutz::debug::postcondition_aux(), rutz::debug::precondition_aux(), print_in(), print_out(), and rutz::trace::~trace(). |
|
|
Assignment operator.
Definition at line 78 of file backtrace.cc. References m_vec. |
|
|
Shorthand for at(i).
Definition at line 83 of file backtrace.h. References at(). |
|
|
Pop the most recent element off of the call stack.
Definition at line 119 of file backtrace.cc. References rutz::static_stack< T, N >::pop(). Referenced by rutz::trace::~trace(). |
|
|
Print the call stack to the given stream.
Definition at line 158 of file backtrace.cc. References i. |
|
|
Print the call stack on stderr.
Definition at line 139 of file backtrace.cc. References rutz::static_stack< T, N >::at(), rutz::prof::context_name(), i, and size(). Referenced by rutz::debug::assert_aux(), rutz::error::error(), rutz::debug::invariant_aux(), rutz::debug::panic_aux(), rutz::debug::postcondition_aux(), and rutz::debug::precondition_aux(). |
|
|
Push a new element onto the call stack. Returns true if successful.
Definition at line 114 of file backtrace.cc. References p. |
|
|
Get the number of elements in the call stack.
Definition at line 124 of file backtrace.cc. References rutz::static_stack< T, N >::size(). Referenced by rutz::format(), and print(). |
|
|
Get the top stack frame, or null if the backtrace is empty.
Definition at line 129 of file backtrace.cc. References rutz::static_stack< T, N >::top(). Referenced by rutz::trace::~trace(). |
1.4.4