-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (31 loc) · 854 Bytes
/
main.cpp
File metadata and controls
41 lines (31 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <vector>
#include <set>
using namespace std;
#include "core.hpp"
#include "mg-symengine.hpp"
#include "parser.hpp"
list<Inst> instlist1, instlist2; // all instructions in the trace
int main(int argc, char **argv) {
if (argc != 2) {
fprintf(stderr, "usage: %s <target>\n", argv[0]);
return 1;
}
ifstream infile1(argv[1]);
if (!infile1.is_open()) {
fprintf(stderr, "Open file error!\n");
return 1;
}
parseTrace(&infile1, &instlist1);
infile1.close();
parseOperand(instlist1.begin(), instlist1.end());
SEEngine *se1 = new SEEngine();
se1->initAllRegSymol(instlist1.begin(), instlist1.end());
se1->symexec();
se1->dumpreg("eax");
return 0;
}