namespace trace {
+// Should match Call::no
+typedef unsigned CallNo;
+
+
typedef unsigned Id;
void visit(Visitor &visitor);
};
-class StackFrame {
-public:
- String* module;
- String* function;
- String* filename;
- String* linenumber;
- String* offset;
- StackFrame() :
- module(NULL),
- function(NULL),
- filename(NULL),
- linenumber(NULL),
- offset(NULL)
- {}
- ~StackFrame();
+struct RawStackFrame {
+ Id id;
+ const char * module;
+ const char * function;
+ const char * filename;
+ int linenumber;
+ long long offset;
+ RawStackFrame() :
+ module(0),
+ function(0),
+ filename(0),
+ linenumber(-1),
+ offset(-1)
+ {
+ }
};
-class Backtrace {
+class StackFrame : public RawStackFrame {
public:
- std::vector<StackFrame*> frames;
- ~Backtrace();
- void addFrame(StackFrame* frame);
+ ~StackFrame();
};
+typedef std::vector<StackFrame *> Backtrace;
+
class Visitor
{
public: