]> git.cworth.org Git - apitrace/blobdiff - trace_parser.hpp
First working implementation of on-demand-loading of frames/calls.
[apitrace] / trace_parser.hpp
index a000986c3631299292745dc213dca060406938d2..a9f11f78949213e00d0dca9b8623c6330f63d489 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <iostream>
 #include <list>
+#include <set>
 
 #include "trace_file.hpp"
 #include "trace_format.hpp"
@@ -57,6 +58,15 @@ protected:
     typedef std::vector<BitmaskSig *> BitmaskMap;
     BitmaskMap bitmasks;
 
+    typedef std::set<File::Offset> TraceOffsets;
+    TraceOffsets m_callSigOffsets;
+    TraceOffsets m_structSigOffsets;
+    TraceOffsets m_enumSigOffsets;
+    TraceOffsets m_bitmaskSigOffsets;
+
+    typedef std::map<File::Offset, unsigned> CallNumOffsets;
+    CallNumOffsets m_callNumOffsets;
+
     unsigned next_call_no;
 
 public:
@@ -87,6 +97,13 @@ public:
         file->setCurrentOffset(offset);
     }
 
+    bool callWithSignature(const File::Offset &offset) const;
+    bool structWithSignature(const File::Offset &offset) const;
+    bool enumWithSignature(const File::Offset &offset) const;
+    bool bitmaskWithSignature(const File::Offset &offset) const;
+    bool hasCallBeenParsed(const File::Offset &offset) const;
+    unsigned callNumForOffset(const File::Offset &offset) const;
+
 protected:
     void parse_enter(void);