fix one segfault bug...something is still strange, but has to do with stack
[c11tester.git] / snapshot-interface.h
1 #ifndef __SNAPINTERFACE_H
2 #define __SNAPINTERFACE_H
3 #include "snapshot.h"
4 #include "mymemory.h"
5 #include <vector>
6 #include <utility>
7 #include <string>
8 #include <map>
9 #include <set>
10 #include "snapshot.h"
11 #include "libthreads.h"
12
13 class snapshotStack;
14 typedef std::basic_string<char, std::char_traits<char>, MyAlloc<char> > MyString;
15
16 void SnapshotGlobalSegments();
17
18 struct stackEntry {
19   struct stackEntry *next;
20   snapshot_id snapshotid;
21   int index;
22 };
23
24 class snapshotStack {
25  public:
26   MEMALLOC
27   snapshotStack( );
28   ~snapshotStack();
29   int backTrackBeforeStep(int seq_index);
30   void snapshotStep(int seq_index);
31
32  private: 
33   struct stackEntry * stack;
34 };
35
36 /* Not sure what it even means to have more than one snapshot object,
37    so let's just make a global reference to it.*/
38
39 extern snapshotStack * snapshotObject;
40 #endif