python-lancelot 0.9.4__cp313-cp313-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lancelot/__init__.py +14 -0
- lancelot/_lib.cp313-win32.pyd +0 -0
- lancelot/be2utils/__init__.py +291 -0
- lancelot/be2utils/binexport2_pb2.py +73 -0
- lancelot/be2utils/binexport2_pb2.pyi +1128 -0
- python_lancelot-0.9.4.dist-info/METADATA +51 -0
- python_lancelot-0.9.4.dist-info/RECORD +9 -0
- python_lancelot-0.9.4.dist-info/WHEEL +4 -0
- python_lancelot-0.9.4.dist-info/licenses/LICENSE.txt +202 -0
|
@@ -0,0 +1,1128 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
The representation is generic to accommodate various source architectures.
|
|
5
|
+
In particular 32 and 64 bit versions of x86, ARM, PowerPC and MIPS have been
|
|
6
|
+
tested.
|
|
7
|
+
|
|
8
|
+
Multiple levels of deduping have been applied to make the format more compact
|
|
9
|
+
and avoid redundant data duplication. Some of this due to hard-earned
|
|
10
|
+
experience trying to cope with intentionally obfuscated malicious binaries.
|
|
11
|
+
Note in particular that the same instruction may occur in multiple basic
|
|
12
|
+
blocks and the same basic block in multiple functions (instruction and basic
|
|
13
|
+
block sharing). Implemented naively, malware can use this to cause
|
|
14
|
+
combinatorial explosion in memory usage, DOSing the analyst. This format
|
|
15
|
+
should store every unique expression, mnemonic, operand, instruction and
|
|
16
|
+
basic block only once instead of duplicating the information for every
|
|
17
|
+
instance of it.
|
|
18
|
+
|
|
19
|
+
This format does _not_ try to be 100% backwards compatible with the old
|
|
20
|
+
version. In particular, we do not store IDA's comment types, making lossless
|
|
21
|
+
porting of IDA comments impossible. We do however, store comments and
|
|
22
|
+
expression substitutions, so porting the actual data is possible, just not
|
|
23
|
+
the exact IDA type.
|
|
24
|
+
|
|
25
|
+
While it would be more natural to use addresses when defining call graph and
|
|
26
|
+
flow graph edges and other such references, it is more efficient to employ
|
|
27
|
+
one more level of indirection and use indices into the basic block or
|
|
28
|
+
function arrays instead. This is because addresses will usually use most of
|
|
29
|
+
the available 64 bit space while indices will be much smaller and compress
|
|
30
|
+
much better (less randomly distributed).
|
|
31
|
+
|
|
32
|
+
We omit all fields that are set to their default value anyways. Note that
|
|
33
|
+
this has two side effects:
|
|
34
|
+
- changing the defaults in this proto file will, in effect, change what's
|
|
35
|
+
read from disk
|
|
36
|
+
- the generated code has_* methods are somewhat less useful
|
|
37
|
+
WARNING: We omit the defaults manually in the code writing the data. Do not
|
|
38
|
+
change the defaults here without changing the code!
|
|
39
|
+
|
|
40
|
+
TODO(cblichmann): Link flow graphs to call graph nodes. The connection is
|
|
41
|
+
there via the address, but tricky to extract.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
import builtins
|
|
45
|
+
import collections.abc
|
|
46
|
+
import google.protobuf.descriptor
|
|
47
|
+
import google.protobuf.internal.containers
|
|
48
|
+
import google.protobuf.internal.enum_type_wrapper
|
|
49
|
+
import google.protobuf.message
|
|
50
|
+
import sys
|
|
51
|
+
import typing
|
|
52
|
+
|
|
53
|
+
if sys.version_info >= (3, 10):
|
|
54
|
+
import typing as typing_extensions
|
|
55
|
+
else:
|
|
56
|
+
import typing_extensions
|
|
57
|
+
|
|
58
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
59
|
+
|
|
60
|
+
@typing_extensions.final
|
|
61
|
+
class BinExport2(google.protobuf.message.Message):
|
|
62
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
63
|
+
|
|
64
|
+
@typing_extensions.final
|
|
65
|
+
class Meta(google.protobuf.message.Message):
|
|
66
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
67
|
+
|
|
68
|
+
EXECUTABLE_NAME_FIELD_NUMBER: builtins.int
|
|
69
|
+
EXECUTABLE_ID_FIELD_NUMBER: builtins.int
|
|
70
|
+
ARCHITECTURE_NAME_FIELD_NUMBER: builtins.int
|
|
71
|
+
TIMESTAMP_FIELD_NUMBER: builtins.int
|
|
72
|
+
executable_name: builtins.str
|
|
73
|
+
"""Input binary filename including file extension but excluding file path.
|
|
74
|
+
example: "insider_gcc.exe"
|
|
75
|
+
"""
|
|
76
|
+
executable_id: builtins.str
|
|
77
|
+
"""Application defined executable id. Often the SHA256 hash of the input
|
|
78
|
+
binary.
|
|
79
|
+
"""
|
|
80
|
+
architecture_name: builtins.str
|
|
81
|
+
"""Input architecture name, e.g. x86-32."""
|
|
82
|
+
timestamp: builtins.int
|
|
83
|
+
"""When did this file get created? Unix time. This may be used for some
|
|
84
|
+
primitive versioning in case the file format ever changes.
|
|
85
|
+
"""
|
|
86
|
+
def __init__(
|
|
87
|
+
self,
|
|
88
|
+
*,
|
|
89
|
+
executable_name: builtins.str | None = ...,
|
|
90
|
+
executable_id: builtins.str | None = ...,
|
|
91
|
+
architecture_name: builtins.str | None = ...,
|
|
92
|
+
timestamp: builtins.int | None = ...,
|
|
93
|
+
) -> None: ...
|
|
94
|
+
def HasField(
|
|
95
|
+
self,
|
|
96
|
+
field_name: typing_extensions.Literal[
|
|
97
|
+
"architecture_name",
|
|
98
|
+
b"architecture_name",
|
|
99
|
+
"executable_id",
|
|
100
|
+
b"executable_id",
|
|
101
|
+
"executable_name",
|
|
102
|
+
b"executable_name",
|
|
103
|
+
"timestamp",
|
|
104
|
+
b"timestamp",
|
|
105
|
+
],
|
|
106
|
+
) -> builtins.bool: ...
|
|
107
|
+
def ClearField(
|
|
108
|
+
self,
|
|
109
|
+
field_name: typing_extensions.Literal[
|
|
110
|
+
"architecture_name",
|
|
111
|
+
b"architecture_name",
|
|
112
|
+
"executable_id",
|
|
113
|
+
b"executable_id",
|
|
114
|
+
"executable_name",
|
|
115
|
+
b"executable_name",
|
|
116
|
+
"timestamp",
|
|
117
|
+
b"timestamp",
|
|
118
|
+
],
|
|
119
|
+
) -> None: ...
|
|
120
|
+
|
|
121
|
+
@typing_extensions.final
|
|
122
|
+
class CallGraph(google.protobuf.message.Message):
|
|
123
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
124
|
+
|
|
125
|
+
@typing_extensions.final
|
|
126
|
+
class Vertex(google.protobuf.message.Message):
|
|
127
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
128
|
+
|
|
129
|
+
class _Type:
|
|
130
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
131
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
132
|
+
|
|
133
|
+
class _TypeEnumTypeWrapper(
|
|
134
|
+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
|
|
135
|
+
BinExport2.CallGraph.Vertex._Type.ValueType
|
|
136
|
+
],
|
|
137
|
+
builtins.type,
|
|
138
|
+
):
|
|
139
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
140
|
+
NORMAL: BinExport2.CallGraph.Vertex._Type.ValueType # 0
|
|
141
|
+
"""Regular function with full disassembly."""
|
|
142
|
+
LIBRARY: BinExport2.CallGraph.Vertex._Type.ValueType # 1
|
|
143
|
+
"""This function is a well known library function."""
|
|
144
|
+
IMPORTED: BinExport2.CallGraph.Vertex._Type.ValueType # 2
|
|
145
|
+
"""Imported from a dynamic link library (e.g. dll)."""
|
|
146
|
+
THUNK: BinExport2.CallGraph.Vertex._Type.ValueType # 3
|
|
147
|
+
"""A thunk function, forwarding its work via an unconditional jump."""
|
|
148
|
+
INVALID: BinExport2.CallGraph.Vertex._Type.ValueType # 4
|
|
149
|
+
"""An invalid function (a function that contained invalid code or was
|
|
150
|
+
considered invalid by some heuristics).
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
|
|
154
|
+
NORMAL: BinExport2.CallGraph.Vertex.Type.ValueType # 0
|
|
155
|
+
"""Regular function with full disassembly."""
|
|
156
|
+
LIBRARY: BinExport2.CallGraph.Vertex.Type.ValueType # 1
|
|
157
|
+
"""This function is a well known library function."""
|
|
158
|
+
IMPORTED: BinExport2.CallGraph.Vertex.Type.ValueType # 2
|
|
159
|
+
"""Imported from a dynamic link library (e.g. dll)."""
|
|
160
|
+
THUNK: BinExport2.CallGraph.Vertex.Type.ValueType # 3
|
|
161
|
+
"""A thunk function, forwarding its work via an unconditional jump."""
|
|
162
|
+
INVALID: BinExport2.CallGraph.Vertex.Type.ValueType # 4
|
|
163
|
+
"""An invalid function (a function that contained invalid code or was
|
|
164
|
+
considered invalid by some heuristics).
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
ADDRESS_FIELD_NUMBER: builtins.int
|
|
168
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
169
|
+
MANGLED_NAME_FIELD_NUMBER: builtins.int
|
|
170
|
+
DEMANGLED_NAME_FIELD_NUMBER: builtins.int
|
|
171
|
+
LIBRARY_INDEX_FIELD_NUMBER: builtins.int
|
|
172
|
+
MODULE_INDEX_FIELD_NUMBER: builtins.int
|
|
173
|
+
address: builtins.int
|
|
174
|
+
"""The function's entry point address. Messages need to be sorted, see
|
|
175
|
+
comment below on `vertex`.
|
|
176
|
+
"""
|
|
177
|
+
type: global___BinExport2.CallGraph.Vertex.Type.ValueType
|
|
178
|
+
mangled_name: builtins.str
|
|
179
|
+
"""If the function has a user defined, real name it will be given here.
|
|
180
|
+
main() is a proper name, sub_BAADF00D is not (auto generated dummy
|
|
181
|
+
name).
|
|
182
|
+
"""
|
|
183
|
+
demangled_name: builtins.str
|
|
184
|
+
"""Demangled name if the function is a mangled C++ function and we could
|
|
185
|
+
demangle it.
|
|
186
|
+
"""
|
|
187
|
+
library_index: builtins.int
|
|
188
|
+
"""If this is a library function, what is its index in library arrays."""
|
|
189
|
+
module_index: builtins.int
|
|
190
|
+
"""If module name, such as class name for DEX files, is present - index in
|
|
191
|
+
module table.
|
|
192
|
+
"""
|
|
193
|
+
def __init__(
|
|
194
|
+
self,
|
|
195
|
+
*,
|
|
196
|
+
address: builtins.int | None = ...,
|
|
197
|
+
type: global___BinExport2.CallGraph.Vertex.Type.ValueType | None = ...,
|
|
198
|
+
mangled_name: builtins.str | None = ...,
|
|
199
|
+
demangled_name: builtins.str | None = ...,
|
|
200
|
+
library_index: builtins.int | None = ...,
|
|
201
|
+
module_index: builtins.int | None = ...,
|
|
202
|
+
) -> None: ...
|
|
203
|
+
def HasField(
|
|
204
|
+
self,
|
|
205
|
+
field_name: typing_extensions.Literal[
|
|
206
|
+
"address",
|
|
207
|
+
b"address",
|
|
208
|
+
"demangled_name",
|
|
209
|
+
b"demangled_name",
|
|
210
|
+
"library_index",
|
|
211
|
+
b"library_index",
|
|
212
|
+
"mangled_name",
|
|
213
|
+
b"mangled_name",
|
|
214
|
+
"module_index",
|
|
215
|
+
b"module_index",
|
|
216
|
+
"type",
|
|
217
|
+
b"type",
|
|
218
|
+
],
|
|
219
|
+
) -> builtins.bool: ...
|
|
220
|
+
def ClearField(
|
|
221
|
+
self,
|
|
222
|
+
field_name: typing_extensions.Literal[
|
|
223
|
+
"address",
|
|
224
|
+
b"address",
|
|
225
|
+
"demangled_name",
|
|
226
|
+
b"demangled_name",
|
|
227
|
+
"library_index",
|
|
228
|
+
b"library_index",
|
|
229
|
+
"mangled_name",
|
|
230
|
+
b"mangled_name",
|
|
231
|
+
"module_index",
|
|
232
|
+
b"module_index",
|
|
233
|
+
"type",
|
|
234
|
+
b"type",
|
|
235
|
+
],
|
|
236
|
+
) -> None: ...
|
|
237
|
+
|
|
238
|
+
@typing_extensions.final
|
|
239
|
+
class Edge(google.protobuf.message.Message):
|
|
240
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
241
|
+
|
|
242
|
+
SOURCE_VERTEX_INDEX_FIELD_NUMBER: builtins.int
|
|
243
|
+
TARGET_VERTEX_INDEX_FIELD_NUMBER: builtins.int
|
|
244
|
+
source_vertex_index: builtins.int
|
|
245
|
+
"""source and target index into the vertex repeated field."""
|
|
246
|
+
target_vertex_index: builtins.int
|
|
247
|
+
def __init__(
|
|
248
|
+
self,
|
|
249
|
+
*,
|
|
250
|
+
source_vertex_index: builtins.int | None = ...,
|
|
251
|
+
target_vertex_index: builtins.int | None = ...,
|
|
252
|
+
) -> None: ...
|
|
253
|
+
def HasField(
|
|
254
|
+
self,
|
|
255
|
+
field_name: typing_extensions.Literal[
|
|
256
|
+
"source_vertex_index", b"source_vertex_index", "target_vertex_index", b"target_vertex_index"
|
|
257
|
+
],
|
|
258
|
+
) -> builtins.bool: ...
|
|
259
|
+
def ClearField(
|
|
260
|
+
self,
|
|
261
|
+
field_name: typing_extensions.Literal[
|
|
262
|
+
"source_vertex_index", b"source_vertex_index", "target_vertex_index", b"target_vertex_index"
|
|
263
|
+
],
|
|
264
|
+
) -> None: ...
|
|
265
|
+
|
|
266
|
+
VERTEX_FIELD_NUMBER: builtins.int
|
|
267
|
+
EDGE_FIELD_NUMBER: builtins.int
|
|
268
|
+
@property
|
|
269
|
+
def vertex(
|
|
270
|
+
self,
|
|
271
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.CallGraph.Vertex]:
|
|
272
|
+
"""vertices == functions in the call graph.
|
|
273
|
+
Important: Most downstream tooling (notably BinDiff), need these to be
|
|
274
|
+
sorted by `Vertex::address` (ascending). For C++, the
|
|
275
|
+
`BinExport2Writer` class enforces this invariant.
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
@property
|
|
279
|
+
def edge(
|
|
280
|
+
self,
|
|
281
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.CallGraph.Edge]:
|
|
282
|
+
"""edges == calls in the call graph."""
|
|
283
|
+
|
|
284
|
+
def __init__(
|
|
285
|
+
self,
|
|
286
|
+
*,
|
|
287
|
+
vertex: collections.abc.Iterable[global___BinExport2.CallGraph.Vertex] | None = ...,
|
|
288
|
+
edge: collections.abc.Iterable[global___BinExport2.CallGraph.Edge] | None = ...,
|
|
289
|
+
) -> None: ...
|
|
290
|
+
def ClearField(self, field_name: typing_extensions.Literal["edge", b"edge", "vertex", b"vertex"]) -> None: ...
|
|
291
|
+
|
|
292
|
+
@typing_extensions.final
|
|
293
|
+
class Expression(google.protobuf.message.Message):
|
|
294
|
+
"""An operand consists of 1 or more expressions, linked together as a tree."""
|
|
295
|
+
|
|
296
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
297
|
+
|
|
298
|
+
class _Type:
|
|
299
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
300
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
301
|
+
|
|
302
|
+
class _TypeEnumTypeWrapper(
|
|
303
|
+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BinExport2.Expression._Type.ValueType],
|
|
304
|
+
builtins.type,
|
|
305
|
+
):
|
|
306
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
307
|
+
SYMBOL: BinExport2.Expression._Type.ValueType # 1
|
|
308
|
+
IMMEDIATE_INT: BinExport2.Expression._Type.ValueType # 2
|
|
309
|
+
IMMEDIATE_FLOAT: BinExport2.Expression._Type.ValueType # 3
|
|
310
|
+
OPERATOR: BinExport2.Expression._Type.ValueType # 4
|
|
311
|
+
REGISTER: BinExport2.Expression._Type.ValueType # 5
|
|
312
|
+
SIZE_PREFIX: BinExport2.Expression._Type.ValueType # 6
|
|
313
|
+
DEREFERENCE: BinExport2.Expression._Type.ValueType # 7
|
|
314
|
+
|
|
315
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
|
|
316
|
+
SYMBOL: BinExport2.Expression.Type.ValueType # 1
|
|
317
|
+
IMMEDIATE_INT: BinExport2.Expression.Type.ValueType # 2
|
|
318
|
+
IMMEDIATE_FLOAT: BinExport2.Expression.Type.ValueType # 3
|
|
319
|
+
OPERATOR: BinExport2.Expression.Type.ValueType # 4
|
|
320
|
+
REGISTER: BinExport2.Expression.Type.ValueType # 5
|
|
321
|
+
SIZE_PREFIX: BinExport2.Expression.Type.ValueType # 6
|
|
322
|
+
DEREFERENCE: BinExport2.Expression.Type.ValueType # 7
|
|
323
|
+
|
|
324
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
325
|
+
SYMBOL_FIELD_NUMBER: builtins.int
|
|
326
|
+
IMMEDIATE_FIELD_NUMBER: builtins.int
|
|
327
|
+
PARENT_INDEX_FIELD_NUMBER: builtins.int
|
|
328
|
+
IS_RELOCATION_FIELD_NUMBER: builtins.int
|
|
329
|
+
type: global___BinExport2.Expression.Type.ValueType
|
|
330
|
+
"""IMMEDIATE_INT is by far the most common type and thus we can save some
|
|
331
|
+
space by omitting it as the default.
|
|
332
|
+
"""
|
|
333
|
+
symbol: builtins.str
|
|
334
|
+
"""Symbol for this expression. Interpretation depends on type. Examples
|
|
335
|
+
include: "eax", "[", "+"
|
|
336
|
+
"""
|
|
337
|
+
immediate: builtins.int
|
|
338
|
+
"""If the expression can be interpreted as an integer value (IMMEDIATE_INT)
|
|
339
|
+
the value is given here.
|
|
340
|
+
"""
|
|
341
|
+
parent_index: builtins.int
|
|
342
|
+
"""The parent expression. Example expression tree for the second operand of:
|
|
343
|
+
mov eax, b4 [ebx + 12]
|
|
344
|
+
"b4" --- "[" --- "+" --- "ebx"
|
|
345
|
+
\\ "12"
|
|
346
|
+
"""
|
|
347
|
+
is_relocation: builtins.bool
|
|
348
|
+
"""true if the expression has entry in relocation table"""
|
|
349
|
+
def __init__(
|
|
350
|
+
self,
|
|
351
|
+
*,
|
|
352
|
+
type: global___BinExport2.Expression.Type.ValueType | None = ...,
|
|
353
|
+
symbol: builtins.str | None = ...,
|
|
354
|
+
immediate: builtins.int | None = ...,
|
|
355
|
+
parent_index: builtins.int | None = ...,
|
|
356
|
+
is_relocation: builtins.bool | None = ...,
|
|
357
|
+
) -> None: ...
|
|
358
|
+
def HasField(
|
|
359
|
+
self,
|
|
360
|
+
field_name: typing_extensions.Literal[
|
|
361
|
+
"immediate",
|
|
362
|
+
b"immediate",
|
|
363
|
+
"is_relocation",
|
|
364
|
+
b"is_relocation",
|
|
365
|
+
"parent_index",
|
|
366
|
+
b"parent_index",
|
|
367
|
+
"symbol",
|
|
368
|
+
b"symbol",
|
|
369
|
+
"type",
|
|
370
|
+
b"type",
|
|
371
|
+
],
|
|
372
|
+
) -> builtins.bool: ...
|
|
373
|
+
def ClearField(
|
|
374
|
+
self,
|
|
375
|
+
field_name: typing_extensions.Literal[
|
|
376
|
+
"immediate",
|
|
377
|
+
b"immediate",
|
|
378
|
+
"is_relocation",
|
|
379
|
+
b"is_relocation",
|
|
380
|
+
"parent_index",
|
|
381
|
+
b"parent_index",
|
|
382
|
+
"symbol",
|
|
383
|
+
b"symbol",
|
|
384
|
+
"type",
|
|
385
|
+
b"type",
|
|
386
|
+
],
|
|
387
|
+
) -> None: ...
|
|
388
|
+
|
|
389
|
+
@typing_extensions.final
|
|
390
|
+
class Operand(google.protobuf.message.Message):
|
|
391
|
+
"""An instruction may have 0 or more operands."""
|
|
392
|
+
|
|
393
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
394
|
+
|
|
395
|
+
EXPRESSION_INDEX_FIELD_NUMBER: builtins.int
|
|
396
|
+
@property
|
|
397
|
+
def expression_index(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
398
|
+
"""Contains all expressions constituting this operand. All expressions
|
|
399
|
+
should be linked into a single tree, i.e. there should only be one
|
|
400
|
+
expression in this list with parent_index == NULL and all others should
|
|
401
|
+
descend from that. Rendering order for expressions on the same tree level
|
|
402
|
+
(siblings) is implicitly given by the order they are referenced in this
|
|
403
|
+
repeated field.
|
|
404
|
+
Implicit: expression sequence
|
|
405
|
+
"""
|
|
406
|
+
|
|
407
|
+
def __init__(
|
|
408
|
+
self,
|
|
409
|
+
*,
|
|
410
|
+
expression_index: collections.abc.Iterable[builtins.int] | None = ...,
|
|
411
|
+
) -> None: ...
|
|
412
|
+
def ClearField(
|
|
413
|
+
self, field_name: typing_extensions.Literal["expression_index", b"expression_index"]
|
|
414
|
+
) -> None: ...
|
|
415
|
+
|
|
416
|
+
@typing_extensions.final
|
|
417
|
+
class Mnemonic(google.protobuf.message.Message):
|
|
418
|
+
"""An instruction has exactly 1 mnemonic."""
|
|
419
|
+
|
|
420
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
421
|
+
|
|
422
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
423
|
+
name: builtins.str
|
|
424
|
+
"""Literal representation of the mnemonic, e.g.: "mov"."""
|
|
425
|
+
def __init__(
|
|
426
|
+
self,
|
|
427
|
+
*,
|
|
428
|
+
name: builtins.str | None = ...,
|
|
429
|
+
) -> None: ...
|
|
430
|
+
def HasField(self, field_name: typing_extensions.Literal["name", b"name"]) -> builtins.bool: ...
|
|
431
|
+
def ClearField(self, field_name: typing_extensions.Literal["name", b"name"]) -> None: ...
|
|
432
|
+
|
|
433
|
+
@typing_extensions.final
|
|
434
|
+
class Instruction(google.protobuf.message.Message):
|
|
435
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
436
|
+
|
|
437
|
+
ADDRESS_FIELD_NUMBER: builtins.int
|
|
438
|
+
CALL_TARGET_FIELD_NUMBER: builtins.int
|
|
439
|
+
MNEMONIC_INDEX_FIELD_NUMBER: builtins.int
|
|
440
|
+
OPERAND_INDEX_FIELD_NUMBER: builtins.int
|
|
441
|
+
RAW_BYTES_FIELD_NUMBER: builtins.int
|
|
442
|
+
COMMENT_INDEX_FIELD_NUMBER: builtins.int
|
|
443
|
+
address: builtins.int
|
|
444
|
+
"""This will only be filled for instructions that do not just flow from the
|
|
445
|
+
immediately preceding instruction. Regular instructions will have to
|
|
446
|
+
calculate their own address by adding raw_bytes.size() to the previous
|
|
447
|
+
instruction's address.
|
|
448
|
+
"""
|
|
449
|
+
@property
|
|
450
|
+
def call_target(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
451
|
+
"""If this is a call instruction and call targets could be determined
|
|
452
|
+
they'll be given here. Note that we may or may not have a flow graph for
|
|
453
|
+
the target and thus cannot use an index into the flow graph table here.
|
|
454
|
+
We could potentially use call graph nodes, but linking instructions to
|
|
455
|
+
the call graph directly does not seem a good choice.
|
|
456
|
+
"""
|
|
457
|
+
mnemonic_index: builtins.int
|
|
458
|
+
"""Index into the mnemonic array of strings. Used for de-duping the data.
|
|
459
|
+
The default value is used for the most common mnemonic in the executable.
|
|
460
|
+
"""
|
|
461
|
+
@property
|
|
462
|
+
def operand_index(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
463
|
+
"""Indices into the operand tree. On X86 this can be 0, 1 or 2 elements
|
|
464
|
+
long, 3 elements with VEX/EVEX.
|
|
465
|
+
Implicit: operand sequence
|
|
466
|
+
"""
|
|
467
|
+
raw_bytes: builtins.bytes
|
|
468
|
+
"""The unmodified input bytes corresponding to this instruction."""
|
|
469
|
+
@property
|
|
470
|
+
def comment_index(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
471
|
+
"""Implicit: comment sequence"""
|
|
472
|
+
|
|
473
|
+
def __init__(
|
|
474
|
+
self,
|
|
475
|
+
*,
|
|
476
|
+
address: builtins.int | None = ...,
|
|
477
|
+
call_target: collections.abc.Iterable[builtins.int] | None = ...,
|
|
478
|
+
mnemonic_index: builtins.int | None = ...,
|
|
479
|
+
operand_index: collections.abc.Iterable[builtins.int] | None = ...,
|
|
480
|
+
raw_bytes: builtins.bytes | None = ...,
|
|
481
|
+
comment_index: collections.abc.Iterable[builtins.int] | None = ...,
|
|
482
|
+
) -> None: ...
|
|
483
|
+
def HasField(
|
|
484
|
+
self,
|
|
485
|
+
field_name: typing_extensions.Literal[
|
|
486
|
+
"address", b"address", "mnemonic_index", b"mnemonic_index", "raw_bytes", b"raw_bytes"
|
|
487
|
+
],
|
|
488
|
+
) -> builtins.bool: ...
|
|
489
|
+
def ClearField(
|
|
490
|
+
self,
|
|
491
|
+
field_name: typing_extensions.Literal[
|
|
492
|
+
"address",
|
|
493
|
+
b"address",
|
|
494
|
+
"call_target",
|
|
495
|
+
b"call_target",
|
|
496
|
+
"comment_index",
|
|
497
|
+
b"comment_index",
|
|
498
|
+
"mnemonic_index",
|
|
499
|
+
b"mnemonic_index",
|
|
500
|
+
"operand_index",
|
|
501
|
+
b"operand_index",
|
|
502
|
+
"raw_bytes",
|
|
503
|
+
b"raw_bytes",
|
|
504
|
+
],
|
|
505
|
+
) -> None: ...
|
|
506
|
+
|
|
507
|
+
@typing_extensions.final
|
|
508
|
+
class BasicBlock(google.protobuf.message.Message):
|
|
509
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
510
|
+
|
|
511
|
+
@typing_extensions.final
|
|
512
|
+
class IndexRange(google.protobuf.message.Message):
|
|
513
|
+
"""This is a space optimization. The instructions for an individual basic
|
|
514
|
+
block will usually be in a continuous index range. Thus it is more
|
|
515
|
+
efficient to store the range instead of individual indices. However, this
|
|
516
|
+
does not hold true for all basic blocks, so we need to be able to store
|
|
517
|
+
multiple index ranges per block.
|
|
518
|
+
"""
|
|
519
|
+
|
|
520
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
521
|
+
|
|
522
|
+
BEGIN_INDEX_FIELD_NUMBER: builtins.int
|
|
523
|
+
END_INDEX_FIELD_NUMBER: builtins.int
|
|
524
|
+
begin_index: builtins.int
|
|
525
|
+
"""These work like begin and end iterators, i.e. the sequence is
|
|
526
|
+
[begin_index, end_index). If the sequence only contains a single
|
|
527
|
+
element end_index will be omitted.
|
|
528
|
+
"""
|
|
529
|
+
end_index: builtins.int
|
|
530
|
+
def __init__(
|
|
531
|
+
self,
|
|
532
|
+
*,
|
|
533
|
+
begin_index: builtins.int | None = ...,
|
|
534
|
+
end_index: builtins.int | None = ...,
|
|
535
|
+
) -> None: ...
|
|
536
|
+
def HasField(
|
|
537
|
+
self, field_name: typing_extensions.Literal["begin_index", b"begin_index", "end_index", b"end_index"]
|
|
538
|
+
) -> builtins.bool: ...
|
|
539
|
+
def ClearField(
|
|
540
|
+
self, field_name: typing_extensions.Literal["begin_index", b"begin_index", "end_index", b"end_index"]
|
|
541
|
+
) -> None: ...
|
|
542
|
+
|
|
543
|
+
INSTRUCTION_INDEX_FIELD_NUMBER: builtins.int
|
|
544
|
+
@property
|
|
545
|
+
def instruction_index(
|
|
546
|
+
self,
|
|
547
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
|
|
548
|
+
global___BinExport2.BasicBlock.IndexRange
|
|
549
|
+
]:
|
|
550
|
+
"""Implicit: instruction sequence"""
|
|
551
|
+
|
|
552
|
+
def __init__(
|
|
553
|
+
self,
|
|
554
|
+
*,
|
|
555
|
+
instruction_index: collections.abc.Iterable[global___BinExport2.BasicBlock.IndexRange] | None = ...,
|
|
556
|
+
) -> None: ...
|
|
557
|
+
def ClearField(
|
|
558
|
+
self, field_name: typing_extensions.Literal["instruction_index", b"instruction_index"]
|
|
559
|
+
) -> None: ...
|
|
560
|
+
|
|
561
|
+
@typing_extensions.final
|
|
562
|
+
class FlowGraph(google.protobuf.message.Message):
|
|
563
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
564
|
+
|
|
565
|
+
@typing_extensions.final
|
|
566
|
+
class Edge(google.protobuf.message.Message):
|
|
567
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
568
|
+
|
|
569
|
+
class _Type:
|
|
570
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
571
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
572
|
+
|
|
573
|
+
class _TypeEnumTypeWrapper(
|
|
574
|
+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BinExport2.FlowGraph.Edge._Type.ValueType],
|
|
575
|
+
builtins.type,
|
|
576
|
+
):
|
|
577
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
578
|
+
CONDITION_TRUE: BinExport2.FlowGraph.Edge._Type.ValueType # 1
|
|
579
|
+
CONDITION_FALSE: BinExport2.FlowGraph.Edge._Type.ValueType # 2
|
|
580
|
+
UNCONDITIONAL: BinExport2.FlowGraph.Edge._Type.ValueType # 3
|
|
581
|
+
SWITCH: BinExport2.FlowGraph.Edge._Type.ValueType # 4
|
|
582
|
+
|
|
583
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
|
|
584
|
+
CONDITION_TRUE: BinExport2.FlowGraph.Edge.Type.ValueType # 1
|
|
585
|
+
CONDITION_FALSE: BinExport2.FlowGraph.Edge.Type.ValueType # 2
|
|
586
|
+
UNCONDITIONAL: BinExport2.FlowGraph.Edge.Type.ValueType # 3
|
|
587
|
+
SWITCH: BinExport2.FlowGraph.Edge.Type.ValueType # 4
|
|
588
|
+
|
|
589
|
+
SOURCE_BASIC_BLOCK_INDEX_FIELD_NUMBER: builtins.int
|
|
590
|
+
TARGET_BASIC_BLOCK_INDEX_FIELD_NUMBER: builtins.int
|
|
591
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
592
|
+
IS_BACK_EDGE_FIELD_NUMBER: builtins.int
|
|
593
|
+
source_basic_block_index: builtins.int
|
|
594
|
+
"""Source instruction will always be the last instruction of the source
|
|
595
|
+
basic block, target instruction the first instruction of the target
|
|
596
|
+
basic block.
|
|
597
|
+
"""
|
|
598
|
+
target_basic_block_index: builtins.int
|
|
599
|
+
type: global___BinExport2.FlowGraph.Edge.Type.ValueType
|
|
600
|
+
is_back_edge: builtins.bool
|
|
601
|
+
"""Indicates whether this is a loop edge as determined by Lengauer-Tarjan."""
|
|
602
|
+
def __init__(
|
|
603
|
+
self,
|
|
604
|
+
*,
|
|
605
|
+
source_basic_block_index: builtins.int | None = ...,
|
|
606
|
+
target_basic_block_index: builtins.int | None = ...,
|
|
607
|
+
type: global___BinExport2.FlowGraph.Edge.Type.ValueType | None = ...,
|
|
608
|
+
is_back_edge: builtins.bool | None = ...,
|
|
609
|
+
) -> None: ...
|
|
610
|
+
def HasField(
|
|
611
|
+
self,
|
|
612
|
+
field_name: typing_extensions.Literal[
|
|
613
|
+
"is_back_edge",
|
|
614
|
+
b"is_back_edge",
|
|
615
|
+
"source_basic_block_index",
|
|
616
|
+
b"source_basic_block_index",
|
|
617
|
+
"target_basic_block_index",
|
|
618
|
+
b"target_basic_block_index",
|
|
619
|
+
"type",
|
|
620
|
+
b"type",
|
|
621
|
+
],
|
|
622
|
+
) -> builtins.bool: ...
|
|
623
|
+
def ClearField(
|
|
624
|
+
self,
|
|
625
|
+
field_name: typing_extensions.Literal[
|
|
626
|
+
"is_back_edge",
|
|
627
|
+
b"is_back_edge",
|
|
628
|
+
"source_basic_block_index",
|
|
629
|
+
b"source_basic_block_index",
|
|
630
|
+
"target_basic_block_index",
|
|
631
|
+
b"target_basic_block_index",
|
|
632
|
+
"type",
|
|
633
|
+
b"type",
|
|
634
|
+
],
|
|
635
|
+
) -> None: ...
|
|
636
|
+
|
|
637
|
+
BASIC_BLOCK_INDEX_FIELD_NUMBER: builtins.int
|
|
638
|
+
ENTRY_BASIC_BLOCK_INDEX_FIELD_NUMBER: builtins.int
|
|
639
|
+
EDGE_FIELD_NUMBER: builtins.int
|
|
640
|
+
@property
|
|
641
|
+
def basic_block_index(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
642
|
+
"""Basic blocks are sorted by address."""
|
|
643
|
+
entry_basic_block_index: builtins.int
|
|
644
|
+
"""The flow graph's entry point address is the first instruction of the
|
|
645
|
+
entry_basic_block.
|
|
646
|
+
"""
|
|
647
|
+
@property
|
|
648
|
+
def edge(
|
|
649
|
+
self,
|
|
650
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
|
|
651
|
+
global___BinExport2.FlowGraph.Edge
|
|
652
|
+
]: ...
|
|
653
|
+
def __init__(
|
|
654
|
+
self,
|
|
655
|
+
*,
|
|
656
|
+
basic_block_index: collections.abc.Iterable[builtins.int] | None = ...,
|
|
657
|
+
entry_basic_block_index: builtins.int | None = ...,
|
|
658
|
+
edge: collections.abc.Iterable[global___BinExport2.FlowGraph.Edge] | None = ...,
|
|
659
|
+
) -> None: ...
|
|
660
|
+
def HasField(
|
|
661
|
+
self, field_name: typing_extensions.Literal["entry_basic_block_index", b"entry_basic_block_index"]
|
|
662
|
+
) -> builtins.bool: ...
|
|
663
|
+
def ClearField(
|
|
664
|
+
self,
|
|
665
|
+
field_name: typing_extensions.Literal[
|
|
666
|
+
"basic_block_index",
|
|
667
|
+
b"basic_block_index",
|
|
668
|
+
"edge",
|
|
669
|
+
b"edge",
|
|
670
|
+
"entry_basic_block_index",
|
|
671
|
+
b"entry_basic_block_index",
|
|
672
|
+
],
|
|
673
|
+
) -> None: ...
|
|
674
|
+
|
|
675
|
+
@typing_extensions.final
|
|
676
|
+
class Reference(google.protobuf.message.Message):
|
|
677
|
+
"""Generic reference class used for address comments (deprecated), string
|
|
678
|
+
references and expression substitutions. It allows referencing from an
|
|
679
|
+
instruction, operand, expression subtree tuple to a de-duped string in the
|
|
680
|
+
string table.
|
|
681
|
+
"""
|
|
682
|
+
|
|
683
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
684
|
+
|
|
685
|
+
INSTRUCTION_INDEX_FIELD_NUMBER: builtins.int
|
|
686
|
+
INSTRUCTION_OPERAND_INDEX_FIELD_NUMBER: builtins.int
|
|
687
|
+
OPERAND_EXPRESSION_INDEX_FIELD_NUMBER: builtins.int
|
|
688
|
+
STRING_TABLE_INDEX_FIELD_NUMBER: builtins.int
|
|
689
|
+
instruction_index: builtins.int
|
|
690
|
+
"""Index into the global instruction table."""
|
|
691
|
+
instruction_operand_index: builtins.int
|
|
692
|
+
"""Index into the operand array local to an instruction."""
|
|
693
|
+
operand_expression_index: builtins.int
|
|
694
|
+
"""Index into the expression array local to an operand."""
|
|
695
|
+
string_table_index: builtins.int
|
|
696
|
+
"""Index into the global string table."""
|
|
697
|
+
def __init__(
|
|
698
|
+
self,
|
|
699
|
+
*,
|
|
700
|
+
instruction_index: builtins.int | None = ...,
|
|
701
|
+
instruction_operand_index: builtins.int | None = ...,
|
|
702
|
+
operand_expression_index: builtins.int | None = ...,
|
|
703
|
+
string_table_index: builtins.int | None = ...,
|
|
704
|
+
) -> None: ...
|
|
705
|
+
def HasField(
|
|
706
|
+
self,
|
|
707
|
+
field_name: typing_extensions.Literal[
|
|
708
|
+
"instruction_index",
|
|
709
|
+
b"instruction_index",
|
|
710
|
+
"instruction_operand_index",
|
|
711
|
+
b"instruction_operand_index",
|
|
712
|
+
"operand_expression_index",
|
|
713
|
+
b"operand_expression_index",
|
|
714
|
+
"string_table_index",
|
|
715
|
+
b"string_table_index",
|
|
716
|
+
],
|
|
717
|
+
) -> builtins.bool: ...
|
|
718
|
+
def ClearField(
|
|
719
|
+
self,
|
|
720
|
+
field_name: typing_extensions.Literal[
|
|
721
|
+
"instruction_index",
|
|
722
|
+
b"instruction_index",
|
|
723
|
+
"instruction_operand_index",
|
|
724
|
+
b"instruction_operand_index",
|
|
725
|
+
"operand_expression_index",
|
|
726
|
+
b"operand_expression_index",
|
|
727
|
+
"string_table_index",
|
|
728
|
+
b"string_table_index",
|
|
729
|
+
],
|
|
730
|
+
) -> None: ...
|
|
731
|
+
|
|
732
|
+
@typing_extensions.final
|
|
733
|
+
class DataReference(google.protobuf.message.Message):
|
|
734
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
735
|
+
|
|
736
|
+
INSTRUCTION_INDEX_FIELD_NUMBER: builtins.int
|
|
737
|
+
ADDRESS_FIELD_NUMBER: builtins.int
|
|
738
|
+
instruction_index: builtins.int
|
|
739
|
+
"""Index into the global instruction table."""
|
|
740
|
+
address: builtins.int
|
|
741
|
+
"""Address being referred."""
|
|
742
|
+
def __init__(
|
|
743
|
+
self,
|
|
744
|
+
*,
|
|
745
|
+
instruction_index: builtins.int | None = ...,
|
|
746
|
+
address: builtins.int | None = ...,
|
|
747
|
+
) -> None: ...
|
|
748
|
+
def HasField(
|
|
749
|
+
self,
|
|
750
|
+
field_name: typing_extensions.Literal["address", b"address", "instruction_index", b"instruction_index"],
|
|
751
|
+
) -> builtins.bool: ...
|
|
752
|
+
def ClearField(
|
|
753
|
+
self,
|
|
754
|
+
field_name: typing_extensions.Literal["address", b"address", "instruction_index", b"instruction_index"],
|
|
755
|
+
) -> None: ...
|
|
756
|
+
|
|
757
|
+
@typing_extensions.final
|
|
758
|
+
class Comment(google.protobuf.message.Message):
|
|
759
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
760
|
+
|
|
761
|
+
class _Type:
|
|
762
|
+
ValueType = typing.NewType("ValueType", builtins.int)
|
|
763
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
764
|
+
|
|
765
|
+
class _TypeEnumTypeWrapper(
|
|
766
|
+
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[BinExport2.Comment._Type.ValueType],
|
|
767
|
+
builtins.type,
|
|
768
|
+
):
|
|
769
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
770
|
+
DEFAULT: BinExport2.Comment._Type.ValueType # 0
|
|
771
|
+
"""A regular instruction comment. Typically displayed next to the
|
|
772
|
+
instruction disassembly.
|
|
773
|
+
"""
|
|
774
|
+
ANTERIOR: BinExport2.Comment._Type.ValueType # 1
|
|
775
|
+
"""A comment line that is typically displayed before (above) the
|
|
776
|
+
instruction it refers to.
|
|
777
|
+
"""
|
|
778
|
+
POSTERIOR: BinExport2.Comment._Type.ValueType # 2
|
|
779
|
+
"""Like ANTERIOR, but a typically displayed after (below)."""
|
|
780
|
+
FUNCTION: BinExport2.Comment._Type.ValueType # 3
|
|
781
|
+
"""Similar to an ANTERIOR comment, but applies to the beginning of an
|
|
782
|
+
identified function. Programs displaying the proto may choose to render
|
|
783
|
+
these differently (e.g. above an inferred function signature).
|
|
784
|
+
"""
|
|
785
|
+
ENUM: BinExport2.Comment._Type.ValueType # 4
|
|
786
|
+
"""Named constants, bitfields and similar."""
|
|
787
|
+
LOCATION: BinExport2.Comment._Type.ValueType # 5
|
|
788
|
+
"""Named locations, usually the target of a jump."""
|
|
789
|
+
GLOBAL_REFERENCE: BinExport2.Comment._Type.ValueType # 6
|
|
790
|
+
"""Data cross references."""
|
|
791
|
+
LOCAL_REFERENCE: BinExport2.Comment._Type.ValueType # 7
|
|
792
|
+
"""Local/stack variables."""
|
|
793
|
+
|
|
794
|
+
class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
|
|
795
|
+
DEFAULT: BinExport2.Comment.Type.ValueType # 0
|
|
796
|
+
"""A regular instruction comment. Typically displayed next to the
|
|
797
|
+
instruction disassembly.
|
|
798
|
+
"""
|
|
799
|
+
ANTERIOR: BinExport2.Comment.Type.ValueType # 1
|
|
800
|
+
"""A comment line that is typically displayed before (above) the
|
|
801
|
+
instruction it refers to.
|
|
802
|
+
"""
|
|
803
|
+
POSTERIOR: BinExport2.Comment.Type.ValueType # 2
|
|
804
|
+
"""Like ANTERIOR, but a typically displayed after (below)."""
|
|
805
|
+
FUNCTION: BinExport2.Comment.Type.ValueType # 3
|
|
806
|
+
"""Similar to an ANTERIOR comment, but applies to the beginning of an
|
|
807
|
+
identified function. Programs displaying the proto may choose to render
|
|
808
|
+
these differently (e.g. above an inferred function signature).
|
|
809
|
+
"""
|
|
810
|
+
ENUM: BinExport2.Comment.Type.ValueType # 4
|
|
811
|
+
"""Named constants, bitfields and similar."""
|
|
812
|
+
LOCATION: BinExport2.Comment.Type.ValueType # 5
|
|
813
|
+
"""Named locations, usually the target of a jump."""
|
|
814
|
+
GLOBAL_REFERENCE: BinExport2.Comment.Type.ValueType # 6
|
|
815
|
+
"""Data cross references."""
|
|
816
|
+
LOCAL_REFERENCE: BinExport2.Comment.Type.ValueType # 7
|
|
817
|
+
"""Local/stack variables."""
|
|
818
|
+
|
|
819
|
+
INSTRUCTION_INDEX_FIELD_NUMBER: builtins.int
|
|
820
|
+
INSTRUCTION_OPERAND_INDEX_FIELD_NUMBER: builtins.int
|
|
821
|
+
OPERAND_EXPRESSION_INDEX_FIELD_NUMBER: builtins.int
|
|
822
|
+
STRING_TABLE_INDEX_FIELD_NUMBER: builtins.int
|
|
823
|
+
REPEATABLE_FIELD_NUMBER: builtins.int
|
|
824
|
+
TYPE_FIELD_NUMBER: builtins.int
|
|
825
|
+
instruction_index: builtins.int
|
|
826
|
+
"""Index into the global instruction table. This is here to enable
|
|
827
|
+
comment processing without having to iterate over all instructions.
|
|
828
|
+
There is an N:M mapping of instructions to comments.
|
|
829
|
+
"""
|
|
830
|
+
instruction_operand_index: builtins.int
|
|
831
|
+
"""Index into the operand array local to an instruction."""
|
|
832
|
+
operand_expression_index: builtins.int
|
|
833
|
+
"""Index into the expression array local to an operand, like in Reference.
|
|
834
|
+
This is not currently used, but allows to implement expression
|
|
835
|
+
substitutions.
|
|
836
|
+
"""
|
|
837
|
+
string_table_index: builtins.int
|
|
838
|
+
"""Index into the global string table."""
|
|
839
|
+
repeatable: builtins.bool
|
|
840
|
+
"""Comment is propagated to all locations that reference the original
|
|
841
|
+
location.
|
|
842
|
+
"""
|
|
843
|
+
type: global___BinExport2.Comment.Type.ValueType
|
|
844
|
+
def __init__(
|
|
845
|
+
self,
|
|
846
|
+
*,
|
|
847
|
+
instruction_index: builtins.int | None = ...,
|
|
848
|
+
instruction_operand_index: builtins.int | None = ...,
|
|
849
|
+
operand_expression_index: builtins.int | None = ...,
|
|
850
|
+
string_table_index: builtins.int | None = ...,
|
|
851
|
+
repeatable: builtins.bool | None = ...,
|
|
852
|
+
type: global___BinExport2.Comment.Type.ValueType | None = ...,
|
|
853
|
+
) -> None: ...
|
|
854
|
+
def HasField(
|
|
855
|
+
self,
|
|
856
|
+
field_name: typing_extensions.Literal[
|
|
857
|
+
"instruction_index",
|
|
858
|
+
b"instruction_index",
|
|
859
|
+
"instruction_operand_index",
|
|
860
|
+
b"instruction_operand_index",
|
|
861
|
+
"operand_expression_index",
|
|
862
|
+
b"operand_expression_index",
|
|
863
|
+
"repeatable",
|
|
864
|
+
b"repeatable",
|
|
865
|
+
"string_table_index",
|
|
866
|
+
b"string_table_index",
|
|
867
|
+
"type",
|
|
868
|
+
b"type",
|
|
869
|
+
],
|
|
870
|
+
) -> builtins.bool: ...
|
|
871
|
+
def ClearField(
|
|
872
|
+
self,
|
|
873
|
+
field_name: typing_extensions.Literal[
|
|
874
|
+
"instruction_index",
|
|
875
|
+
b"instruction_index",
|
|
876
|
+
"instruction_operand_index",
|
|
877
|
+
b"instruction_operand_index",
|
|
878
|
+
"operand_expression_index",
|
|
879
|
+
b"operand_expression_index",
|
|
880
|
+
"repeatable",
|
|
881
|
+
b"repeatable",
|
|
882
|
+
"string_table_index",
|
|
883
|
+
b"string_table_index",
|
|
884
|
+
"type",
|
|
885
|
+
b"type",
|
|
886
|
+
],
|
|
887
|
+
) -> None: ...
|
|
888
|
+
|
|
889
|
+
@typing_extensions.final
|
|
890
|
+
class Section(google.protobuf.message.Message):
|
|
891
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
892
|
+
|
|
893
|
+
ADDRESS_FIELD_NUMBER: builtins.int
|
|
894
|
+
SIZE_FIELD_NUMBER: builtins.int
|
|
895
|
+
FLAG_R_FIELD_NUMBER: builtins.int
|
|
896
|
+
FLAG_W_FIELD_NUMBER: builtins.int
|
|
897
|
+
FLAG_X_FIELD_NUMBER: builtins.int
|
|
898
|
+
address: builtins.int
|
|
899
|
+
"""Section start address."""
|
|
900
|
+
size: builtins.int
|
|
901
|
+
"""Section size."""
|
|
902
|
+
flag_r: builtins.bool
|
|
903
|
+
"""Read flag of the section, True when section is readable."""
|
|
904
|
+
flag_w: builtins.bool
|
|
905
|
+
"""Write flag of the section, True when section is writable."""
|
|
906
|
+
flag_x: builtins.bool
|
|
907
|
+
"""Execute flag of the section, True when section is executable."""
|
|
908
|
+
def __init__(
|
|
909
|
+
self,
|
|
910
|
+
*,
|
|
911
|
+
address: builtins.int | None = ...,
|
|
912
|
+
size: builtins.int | None = ...,
|
|
913
|
+
flag_r: builtins.bool | None = ...,
|
|
914
|
+
flag_w: builtins.bool | None = ...,
|
|
915
|
+
flag_x: builtins.bool | None = ...,
|
|
916
|
+
) -> None: ...
|
|
917
|
+
def HasField(
|
|
918
|
+
self,
|
|
919
|
+
field_name: typing_extensions.Literal[
|
|
920
|
+
"address", b"address", "flag_r", b"flag_r", "flag_w", b"flag_w", "flag_x", b"flag_x", "size", b"size"
|
|
921
|
+
],
|
|
922
|
+
) -> builtins.bool: ...
|
|
923
|
+
def ClearField(
|
|
924
|
+
self,
|
|
925
|
+
field_name: typing_extensions.Literal[
|
|
926
|
+
"address", b"address", "flag_r", b"flag_r", "flag_w", b"flag_w", "flag_x", b"flag_x", "size", b"size"
|
|
927
|
+
],
|
|
928
|
+
) -> None: ...
|
|
929
|
+
|
|
930
|
+
@typing_extensions.final
|
|
931
|
+
class Library(google.protobuf.message.Message):
|
|
932
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
933
|
+
|
|
934
|
+
IS_STATIC_FIELD_NUMBER: builtins.int
|
|
935
|
+
LOAD_ADDRESS_FIELD_NUMBER: builtins.int
|
|
936
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
937
|
+
is_static: builtins.bool
|
|
938
|
+
"""If this library is statically linked."""
|
|
939
|
+
load_address: builtins.int
|
|
940
|
+
"""Address where this library was loaded, 0 if unknown."""
|
|
941
|
+
name: builtins.str
|
|
942
|
+
"""Name of the library (format is platform-dependent)."""
|
|
943
|
+
def __init__(
|
|
944
|
+
self,
|
|
945
|
+
*,
|
|
946
|
+
is_static: builtins.bool | None = ...,
|
|
947
|
+
load_address: builtins.int | None = ...,
|
|
948
|
+
name: builtins.str | None = ...,
|
|
949
|
+
) -> None: ...
|
|
950
|
+
def HasField(
|
|
951
|
+
self,
|
|
952
|
+
field_name: typing_extensions.Literal[
|
|
953
|
+
"is_static", b"is_static", "load_address", b"load_address", "name", b"name"
|
|
954
|
+
],
|
|
955
|
+
) -> builtins.bool: ...
|
|
956
|
+
def ClearField(
|
|
957
|
+
self,
|
|
958
|
+
field_name: typing_extensions.Literal[
|
|
959
|
+
"is_static", b"is_static", "load_address", b"load_address", "name", b"name"
|
|
960
|
+
],
|
|
961
|
+
) -> None: ...
|
|
962
|
+
|
|
963
|
+
@typing_extensions.final
|
|
964
|
+
class Module(google.protobuf.message.Message):
|
|
965
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
966
|
+
|
|
967
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
968
|
+
name: builtins.str
|
|
969
|
+
"""Name, such as Java class name. Platform-dependent."""
|
|
970
|
+
def __init__(
|
|
971
|
+
self,
|
|
972
|
+
*,
|
|
973
|
+
name: builtins.str | None = ...,
|
|
974
|
+
) -> None: ...
|
|
975
|
+
def HasField(self, field_name: typing_extensions.Literal["name", b"name"]) -> builtins.bool: ...
|
|
976
|
+
def ClearField(self, field_name: typing_extensions.Literal["name", b"name"]) -> None: ...
|
|
977
|
+
|
|
978
|
+
META_INFORMATION_FIELD_NUMBER: builtins.int
|
|
979
|
+
EXPRESSION_FIELD_NUMBER: builtins.int
|
|
980
|
+
OPERAND_FIELD_NUMBER: builtins.int
|
|
981
|
+
MNEMONIC_FIELD_NUMBER: builtins.int
|
|
982
|
+
INSTRUCTION_FIELD_NUMBER: builtins.int
|
|
983
|
+
BASIC_BLOCK_FIELD_NUMBER: builtins.int
|
|
984
|
+
FLOW_GRAPH_FIELD_NUMBER: builtins.int
|
|
985
|
+
CALL_GRAPH_FIELD_NUMBER: builtins.int
|
|
986
|
+
STRING_TABLE_FIELD_NUMBER: builtins.int
|
|
987
|
+
ADDRESS_COMMENT_FIELD_NUMBER: builtins.int
|
|
988
|
+
COMMENT_FIELD_NUMBER: builtins.int
|
|
989
|
+
STRING_REFERENCE_FIELD_NUMBER: builtins.int
|
|
990
|
+
EXPRESSION_SUBSTITUTION_FIELD_NUMBER: builtins.int
|
|
991
|
+
SECTION_FIELD_NUMBER: builtins.int
|
|
992
|
+
LIBRARY_FIELD_NUMBER: builtins.int
|
|
993
|
+
DATA_REFERENCE_FIELD_NUMBER: builtins.int
|
|
994
|
+
MODULE_FIELD_NUMBER: builtins.int
|
|
995
|
+
@property
|
|
996
|
+
def meta_information(self) -> global___BinExport2.Meta: ...
|
|
997
|
+
@property
|
|
998
|
+
def expression(
|
|
999
|
+
self,
|
|
1000
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Expression]: ...
|
|
1001
|
+
@property
|
|
1002
|
+
def operand(
|
|
1003
|
+
self,
|
|
1004
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Operand]: ...
|
|
1005
|
+
@property
|
|
1006
|
+
def mnemonic(
|
|
1007
|
+
self,
|
|
1008
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Mnemonic]: ...
|
|
1009
|
+
@property
|
|
1010
|
+
def instruction(
|
|
1011
|
+
self,
|
|
1012
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Instruction]: ...
|
|
1013
|
+
@property
|
|
1014
|
+
def basic_block(
|
|
1015
|
+
self,
|
|
1016
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.BasicBlock]: ...
|
|
1017
|
+
@property
|
|
1018
|
+
def flow_graph(
|
|
1019
|
+
self,
|
|
1020
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.FlowGraph]: ...
|
|
1021
|
+
@property
|
|
1022
|
+
def call_graph(self) -> global___BinExport2.CallGraph: ...
|
|
1023
|
+
@property
|
|
1024
|
+
def string_table(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
|
|
1025
|
+
@property
|
|
1026
|
+
def address_comment(
|
|
1027
|
+
self,
|
|
1028
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Reference]:
|
|
1029
|
+
"""No longer written. This is here so that BinDiff can work with older
|
|
1030
|
+
BinExport files.
|
|
1031
|
+
"""
|
|
1032
|
+
|
|
1033
|
+
@property
|
|
1034
|
+
def comment(
|
|
1035
|
+
self,
|
|
1036
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Comment]:
|
|
1037
|
+
"""Rich comment index used for BinDiff's comment porting."""
|
|
1038
|
+
|
|
1039
|
+
@property
|
|
1040
|
+
def string_reference(
|
|
1041
|
+
self,
|
|
1042
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Reference]: ...
|
|
1043
|
+
@property
|
|
1044
|
+
def expression_substitution(
|
|
1045
|
+
self,
|
|
1046
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Reference]: ...
|
|
1047
|
+
@property
|
|
1048
|
+
def section(
|
|
1049
|
+
self,
|
|
1050
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Section]: ...
|
|
1051
|
+
@property
|
|
1052
|
+
def library(
|
|
1053
|
+
self,
|
|
1054
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Library]: ...
|
|
1055
|
+
@property
|
|
1056
|
+
def data_reference(
|
|
1057
|
+
self,
|
|
1058
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.DataReference]: ...
|
|
1059
|
+
@property
|
|
1060
|
+
def module(
|
|
1061
|
+
self,
|
|
1062
|
+
) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinExport2.Module]: ...
|
|
1063
|
+
def __init__(
|
|
1064
|
+
self,
|
|
1065
|
+
*,
|
|
1066
|
+
meta_information: global___BinExport2.Meta | None = ...,
|
|
1067
|
+
expression: collections.abc.Iterable[global___BinExport2.Expression] | None = ...,
|
|
1068
|
+
operand: collections.abc.Iterable[global___BinExport2.Operand] | None = ...,
|
|
1069
|
+
mnemonic: collections.abc.Iterable[global___BinExport2.Mnemonic] | None = ...,
|
|
1070
|
+
instruction: collections.abc.Iterable[global___BinExport2.Instruction] | None = ...,
|
|
1071
|
+
basic_block: collections.abc.Iterable[global___BinExport2.BasicBlock] | None = ...,
|
|
1072
|
+
flow_graph: collections.abc.Iterable[global___BinExport2.FlowGraph] | None = ...,
|
|
1073
|
+
call_graph: global___BinExport2.CallGraph | None = ...,
|
|
1074
|
+
string_table: collections.abc.Iterable[builtins.str] | None = ...,
|
|
1075
|
+
address_comment: collections.abc.Iterable[global___BinExport2.Reference] | None = ...,
|
|
1076
|
+
comment: collections.abc.Iterable[global___BinExport2.Comment] | None = ...,
|
|
1077
|
+
string_reference: collections.abc.Iterable[global___BinExport2.Reference] | None = ...,
|
|
1078
|
+
expression_substitution: collections.abc.Iterable[global___BinExport2.Reference] | None = ...,
|
|
1079
|
+
section: collections.abc.Iterable[global___BinExport2.Section] | None = ...,
|
|
1080
|
+
library: collections.abc.Iterable[global___BinExport2.Library] | None = ...,
|
|
1081
|
+
data_reference: collections.abc.Iterable[global___BinExport2.DataReference] | None = ...,
|
|
1082
|
+
module: collections.abc.Iterable[global___BinExport2.Module] | None = ...,
|
|
1083
|
+
) -> None: ...
|
|
1084
|
+
def HasField(
|
|
1085
|
+
self,
|
|
1086
|
+
field_name: typing_extensions.Literal["call_graph", b"call_graph", "meta_information", b"meta_information"],
|
|
1087
|
+
) -> builtins.bool: ...
|
|
1088
|
+
def ClearField(
|
|
1089
|
+
self,
|
|
1090
|
+
field_name: typing_extensions.Literal[
|
|
1091
|
+
"address_comment",
|
|
1092
|
+
b"address_comment",
|
|
1093
|
+
"basic_block",
|
|
1094
|
+
b"basic_block",
|
|
1095
|
+
"call_graph",
|
|
1096
|
+
b"call_graph",
|
|
1097
|
+
"comment",
|
|
1098
|
+
b"comment",
|
|
1099
|
+
"data_reference",
|
|
1100
|
+
b"data_reference",
|
|
1101
|
+
"expression",
|
|
1102
|
+
b"expression",
|
|
1103
|
+
"expression_substitution",
|
|
1104
|
+
b"expression_substitution",
|
|
1105
|
+
"flow_graph",
|
|
1106
|
+
b"flow_graph",
|
|
1107
|
+
"instruction",
|
|
1108
|
+
b"instruction",
|
|
1109
|
+
"library",
|
|
1110
|
+
b"library",
|
|
1111
|
+
"meta_information",
|
|
1112
|
+
b"meta_information",
|
|
1113
|
+
"mnemonic",
|
|
1114
|
+
b"mnemonic",
|
|
1115
|
+
"module",
|
|
1116
|
+
b"module",
|
|
1117
|
+
"operand",
|
|
1118
|
+
b"operand",
|
|
1119
|
+
"section",
|
|
1120
|
+
b"section",
|
|
1121
|
+
"string_reference",
|
|
1122
|
+
b"string_reference",
|
|
1123
|
+
"string_table",
|
|
1124
|
+
b"string_table",
|
|
1125
|
+
],
|
|
1126
|
+
) -> None: ...
|
|
1127
|
+
|
|
1128
|
+
global___BinExport2 = BinExport2
|