Leosac
0.8.0
Open Source Access Control
|
Store information about a stacktrace at a given point in the program execution. More...
#include <Stacktrace.hpp>
Classes | |
struct | Frame |
Public Member Functions | |
Stacktrace (uint skip) | |
Build a new stacktrace. More... | |
std::string | str (int max_frames=10) const |
Private Attributes | |
std::vector< Frame > | stack_ |
We use a vector to represent the stack so we can iterate on the frames. More... | |
Store information about a stacktrace at a given point in the program execution.
The stacktrace represents the states at the time the object was instancied. This object can then be moved around or copied.
The reason for this class to be is because struct backtrace_state *
from GCC's libbacktrace cannot be moved around.
Definition at line 42 of file Stacktrace.hpp.
Stacktrace::Stacktrace | ( | uint | skip | ) |
Build a new stacktrace.
skip | The number of stackframe to skip. |
Definition at line 36 of file Stacktrace.cpp.
std::string Stacktrace::str | ( | int | max_frames = 10 | ) | const |
Definition at line 68 of file Stacktrace.cpp.
|
private |
We use a vector to represent the stack so we can iterate on the frames.
Definition at line 77 of file Stacktrace.hpp.