libcruft-util/backtrace.hpp

24 lines
452 B
C++
Raw Normal View History

2011-05-23 17:18:52 +10:00
#include <string>
#include <vector>
#include <iostream>
namespace debug {
class backtrace {
protected:
static const unsigned int DEFAULT_DEPTH = 16;
std::vector<void *> m_frames;
public:
backtrace (void);
const decltype(m_frames)& frames(void) const
{ return m_frames; }
};
2012-05-10 16:53:29 +10:00
std::ostream&
operator <<(std::ostream&, const debug::backtrace&);
2011-05-23 17:18:52 +10:00
}