X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_model.hpp;h=2ce133903d1ffb3f822d7186d215587ffe7808a3;hb=771273711a483847df104149a992746b44bb8314;hp=36f0a03eff83cb15d5919fb86b661eb0cd271513;hpb=c037ae2b4f749aed15ede635a6b517534bc5a901;p=apitrace diff --git a/common/trace_model.hpp b/common/trace_model.hpp index 36f0a03..2ce1339 100644 --- a/common/trace_model.hpp +++ b/common/trace_model.hpp @@ -36,6 +36,7 @@ #include #include +#include namespace trace { @@ -388,6 +389,22 @@ struct RawStackFrame { offset(-1) { } + + void dump(std::ostream &os) { + os << (this->module ? this->module : "?"); + if (this->function != NULL) { + os << ": " << this->function; + } + if (this->offset >= 0) { + os << "+0x" << std::hex << this->offset << std::dec; + } + if (this->filename != NULL) { + os << ": " << this->filename; + if (this->linenumber >= 0) { + os << ":" << this->linenumber; + } + } + } }; class StackFrame : public RawStackFrame { @@ -498,6 +515,13 @@ enum { * Whether this call is verbose (i.e., not usually interesting). */ CALL_FLAG_VERBOSE = (1 << 7), + + /** + * String markers. + */ + CALL_FLAG_MARKER = (1 << 8), + CALL_FLAG_MARKER_PUSH = (1 << 9), + CALL_FLAG_MARKER_POP = (1 << 10), };