]> git.tdb.fi Git - libs/core.git/blob - source/debug/backtrace.h
Fix the Build file so that io headers are installed
[libs/core.git] / source / debug / backtrace.h
1 #ifndef MSP_DEBUG_BACKTRACE_H_
2 #define MSP_DEBUG_BACKTRACE_H_
3
4 #include <list>
5 #include <ostream>
6 #include <string>
7
8 namespace Msp {
9 namespace Debug {
10
11 class Backtrace
12 {
13 public:
14         struct StackFrame
15         {
16                 void *address;
17                 std::string file;
18                 std::string symbol;
19         };
20
21 private:
22         std::list<StackFrame> frames;
23
24 public:
25         const std::list<StackFrame> &get_frames() const { return frames; }
26
27         static Backtrace create();
28 };
29
30 std::ostream &operator<<(std::ostream &, const Backtrace &);
31 std::ostream &operator<<(std::ostream &, const Backtrace::StackFrame &);
32
33 } // namespace Debug
34 } // namespace Msp
35
36 #endif