-
Notifications
You must be signed in to change notification settings - Fork 17
/
edge.h
36 lines (27 loc) · 807 Bytes
/
edge.h
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
#ifndef NUCLEUS_EDGE_H
#define NUCLEUS_EDGE_H
#include <stdint.h>
#include <string>
class BB;
class Edge {
public:
enum EdgeType {
EDGE_TYPE_NONE,
EDGE_TYPE_JMP,
EDGE_TYPE_JMP_INDIRECT,
EDGE_TYPE_CALL,
EDGE_TYPE_CALL_INDIRECT,
EDGE_TYPE_RET,
EDGE_TYPE_FALLTHROUGH
};
Edge(Edge::EdgeType type_, BB *src_, BB *dst_) : type(type_), src(src_), dst(dst_), is_switch(false), jmptab(0), offset(0) {}
Edge(Edge::EdgeType type_, BB *src_, BB *dst_, bool is_switch_, uint64_t jmptab_, unsigned offset_) : type(type_), src(src_), dst(dst_), is_switch(is_switch_), jmptab(jmptab_), offset(offset_) {}
std::string type2str ();
EdgeType type;
BB *src;
BB *dst;
bool is_switch;
uint64_t jmptab;
unsigned offset;
};
#endif /* NUCLEUS_EDGE_H */