-
Notifications
You must be signed in to change notification settings - Fork 5
/
idaas.thrift
166 lines (140 loc) · 2.75 KB
/
idaas.thrift
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
namespace cpp idaas
namespace csharp Idaas
struct ida_enum_const {
1: required string name
2: required i32 value
3: i32 mask = -1
}
struct ida_enum {
1: required string name
2: bool isBitfield = false
3: list<ida_enum_const> constants
}
struct IdaStructMember {
1: required string name
2: required string type
}
struct IdaStruct {
1: required string name
2: bool isUnion = false
3: list<IdaStructMember> members
}
struct ida_string {
1: required i32 address
2: required string value
}
enum IdaRefType {
Data = 1
}
struct IdaRef {
1: required i32 refFrom
2: required i32 refTo
}
struct IdaFunction {
1: required i32 startAddress
2: required i32 endAddress
3: required string name
4: required string type
}
struct IdaFunctionFrame {
1: required i32 address
2: required list<IdaStructMember> arguments
3: required list<IdaStructMember> variables
}
enum IdaSegmentType {
Unknown = 0
Data = 1
Code = 2
Import = 3
}
struct IdaNamedAddress {
1: required i32 address
2: required string name
3: required string type
4: required IdaSegmentType segment
}
enum IdaOperandType {
Unknown = 0
Register = 1
Constant = 2
Memory = 3
Displacement = 4
Address = 5
FPRegister = 6
}
enum IdaRegister {
Unknown = 0
Al
Ah
Ax
Eax
Bl
Bh
Bx
Ebx
Cl
Ch
Cx
Ecx
Dl
Dh
Dx
Edx
Esi
Edi
Ebp
Esp
Xmm0
Xmm1
Xmm2
Xmm3
None
}
struct IdaOperand {
1: required IdaOperandType type
2: IdaRegister register_
3: i32 address
4: IdaRegister baseRegister
5: IdaRegister indexRegister
6: i32 indexScale
7: required byte size
8: i32 value
}
struct IdaInstruction {
1: required i32 address
2: required i32 size
3: required string mnemonic
4: required list<IdaOperand> operands
5: required list<string> prefixes
}
struct IdaTypeInfo {
1: string name
2: string type
3: string fields
}
struct IdaTypeLibrary {
1: required string name
2: required list<IdaTypeInfo> types
3: required list<string> baseLibraries
}
service Database {
list<ida_enum> listEnums()
bool storeEnum(1: ida_enum _enum)
bool storeEnums(1: list<ida_enum> enums)
void deleteEnum(1: string name)
list<IdaStruct> listStructures()
bool storeStructure(1: IdaStruct _struct)
bool storeStructures(1: list<IdaStruct> structs)
void deleteStruct(1: string name)
list<ida_string> listStrings()
list<IdaRef> xrefsTo(1: i32 address, 2: IdaRefType refType)
list<IdaRef> xrefsFrom(1: i32 address, 2: IdaRefType refType)
IdaInstruction fetchInstruction(1: i32 address)
list<IdaFunction> listFunctions()
IdaFunctionFrame getFunctionFrame(1: i32 address)
IdaTypeInfo parseTypeDeclaration(1: string typeDeclaration)
string formatTypeInfo(1: IdaTypeInfo typeInfo)
list<IdaTypeLibrary> listTypeLibraries()
list<IdaNamedAddress> listNamedAddresses()
void waitBackgroundTasks()
}