-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpivot.h
39 lines (31 loc) · 863 Bytes
/
pivot.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
36
37
38
39
#ifndef __PIVOT_H
#define __PIVOT_H
/**
@author Edward J. Schwartz
*/
#include "pin.H"
#include "pin_taint.h"
#include "pin_misc.h"
#include <set>
#include <stdint.h>
/**
Types of pivots.
Switchstack is ESP <- reg + c.
Mempivot is ESP <- M[reg + c].
*/
typedef enum { UNKNOWN, SWITCHSTACK, MEMPIVOT } pivottype_t;
/** Pivot objects */
bool operator<(const struct pivot_s &a, const struct pivot_s &b);
typedef struct pivot_s {
ADDRINT address; /** Gadget address. */
pivottype_t t; /** Type of pivot. */
REG base; /** Base register. */
ADDRINT offset; /** Offset */
} pivot_t;
/** Sets of pivot objects */
typedef set<pivot_t> pivot_set;
/** Function headers */
pivot_set PIVOT_parseinput(istream &f);
void PIVOT_testpivot(pivot_set, CONTEXT *, pintrace::TaintTracker &);
ostream& operator<<(ostream &o, const pivot_s &);
#endif