X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_writer.hpp;h=a75d5ac69ef188e49e408f71eb6c2336fcd54649;hb=ba7bb0d584f82da2de0db2af720c037ca386c945;hp=f8d0afb12bf0261408135897692d60afcc57eabd;hpb=69909e3853c23d0ce062b6c9f232191970da9aee;p=apitrace diff --git a/common/trace_writer.hpp b/common/trace_writer.hpp index f8d0afb..a75d5ac 100644 --- a/common/trace_writer.hpp +++ b/common/trace_writer.hpp @@ -50,6 +50,7 @@ namespace trace { std::vector structs; std::vector enums; std::vector bitmasks; + std::vector frames; public: Writer(); @@ -58,22 +59,6 @@ namespace trace { bool open(const char *filename); void close(void); - void writeBacktrace(std::vector backtrace); - void beginBacktrace(void); - void endBacktrace(void); - void beginStackFrame(void); - inline void endStackFrame(void) {} - void beginStackFrameModule(void); - inline void endStackFrameModule(void) {} - void beginStackFrameFunction(void); - inline void endStackFrameFunction(void) {} - void beginStackFrameFilename(void); - inline void endStackFrameFilename(void) {} - void beginStackFrameLinenumber(void); - inline void endStackFrameLinenumber(void) {} - void beginStackFrameOffset(void); - inline void endStackFrameOffset(void) {} - unsigned beginEnter(const FunctionSig *sig, unsigned thread_id); void endEnter(void); @@ -86,6 +71,10 @@ namespace trace { void beginReturn(void); inline void endReturn(void) {} + void beginBacktrace(unsigned num_frames); + void writeStackFrame(const RawStackFrame *frame); + inline void endBacktrace(void) {} + void beginArray(size_t length); inline void endArray(void) {}