lief 0.16.5__cp312-cp312-musllinux_1_2_i686.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.

Potentially problematic release.


This version of lief might be problematic. Click here for more details.

@@ -0,0 +1,32 @@
1
+ from typing import Iterator, Optional, Union
2
+
3
+ import lief
4
+
5
+
6
+ class Immediate(lief.assembly.x86.Operand):
7
+ @property
8
+ def value(self) -> int: ...
9
+
10
+ class Memory(lief.assembly.x86.Operand):
11
+ @property
12
+ def base(self) -> lief.assembly.x86.REG: ...
13
+
14
+ @property
15
+ def scaled_register(self) -> lief.assembly.x86.REG: ...
16
+
17
+ @property
18
+ def segment_register(self) -> lief.assembly.x86.REG: ...
19
+
20
+ @property
21
+ def scale(self) -> int: ...
22
+
23
+ @property
24
+ def displacement(self) -> int: ...
25
+
26
+ class PCRelative(lief.assembly.x86.Operand):
27
+ @property
28
+ def value(self) -> int: ...
29
+
30
+ class Register(lief.assembly.x86.Operand):
31
+ @property
32
+ def value(self) -> lief.assembly.x86.REG: ...
lief/dsc/__init__.pyi ADDED
@@ -0,0 +1,220 @@
1
+ from collections.abc import Sequence
2
+ import enum
3
+ import os
4
+ from typing import Iterator, Optional, Union, overload
5
+
6
+ import lief
7
+
8
+
9
+ class DyldSharedCache:
10
+ class VERSION(enum.Enum):
11
+ UNKNOWN = 0
12
+
13
+ DYLD_95_3 = 1
14
+
15
+ DYLD_195_5 = 2
16
+
17
+ DYLD_239_3 = 3
18
+
19
+ DYLD_360_14 = 4
20
+
21
+ DYLD_421_1 = 5
22
+
23
+ DYLD_832_7_1 = 6
24
+
25
+ DYLD_940 = 7
26
+
27
+ DYLD_1042_1 = 8
28
+
29
+ UNRELEASED = 9
30
+
31
+ class PLATFORM(enum.Enum):
32
+ UNKNOWN = 0
33
+
34
+ MACOS = 1
35
+
36
+ IOS = 2
37
+
38
+ TVOS = 3
39
+
40
+ WATCHOS = 4
41
+
42
+ BRIDGEOS = 5
43
+
44
+ IOSMAC = 6
45
+
46
+ IOS_SIMULATOR = 7
47
+
48
+ TVOS_SIMULATOR = 8
49
+
50
+ WATCHOS_SIMULATOR = 9
51
+
52
+ DRIVERKIT = 10
53
+
54
+ VISIONOS = 11
55
+
56
+ VISIONOS_SIMULATOR = 12
57
+
58
+ FIRMWARE = 13
59
+
60
+ SEPOS = 14
61
+
62
+ ANY = 4294967295
63
+
64
+ class ARCH(enum.Enum):
65
+ UNKNOWN = 0
66
+
67
+ I386 = 1
68
+
69
+ X86_64 = 2
70
+
71
+ X86_64H = 3
72
+
73
+ ARMV5 = 4
74
+
75
+ ARMV6 = 5
76
+
77
+ ARMV7 = 6
78
+
79
+ ARM64 = 7
80
+
81
+ ARM64E = 8
82
+
83
+ @staticmethod
84
+ def from_path(path: str, arch: str = '') -> Optional[DyldSharedCache]: ...
85
+
86
+ @staticmethod
87
+ def from_files(files: Sequence[str]) -> Optional[DyldSharedCache]: ...
88
+
89
+ @property
90
+ def filename(self) -> str: ...
91
+
92
+ @property
93
+ def version(self) -> DyldSharedCache.VERSION: ...
94
+
95
+ @property
96
+ def filepath(self) -> str: ...
97
+
98
+ @property
99
+ def load_address(self) -> int: ...
100
+
101
+ @property
102
+ def arch_name(self) -> str: ...
103
+
104
+ @property
105
+ def platform(self) -> DyldSharedCache.PLATFORM: ...
106
+
107
+ @property
108
+ def arch(self) -> DyldSharedCache.ARCH: ...
109
+
110
+ @property
111
+ def has_subcaches(self) -> bool: ...
112
+
113
+ def find_lib_from_va(self, virtual_address: int) -> Optional[Dylib]: ...
114
+
115
+ def find_lib_from_path(self, path: str) -> Optional[Dylib]: ...
116
+
117
+ def find_lib_from_name(self, name: str) -> Optional[Dylib]: ...
118
+
119
+ @property
120
+ def libraries(self) -> Sequence[Optional[Dylib]]: ...
121
+
122
+ @property
123
+ def mapping_info(self) -> Sequence[Optional[MappingInfo]]: ...
124
+
125
+ @property
126
+ def subcaches(self) -> Sequence[Optional[SubCache]]: ...
127
+
128
+ def get_content_from_va(self, addr: int, size: int) -> bytes: ...
129
+
130
+ def cache_for_address(self, address: int) -> Optional[DyldSharedCache]: ...
131
+
132
+ @property
133
+ def main_cache(self) -> Optional[DyldSharedCache]: ...
134
+
135
+ def find_subcache(self, filename: str) -> Optional[DyldSharedCache]: ...
136
+
137
+ def va_to_offset(self, virtual_address: int) -> Union[int, lief.lief_errors]: ...
138
+
139
+ def disassemble(self, arg: int, /) -> Iterator[Optional[lief.assembly.Instruction]]: ...
140
+
141
+ def enable_caching(self, target_dir: str) -> None: ...
142
+
143
+ def flush_cache(self) -> None: ...
144
+
145
+ class Dylib:
146
+ class extract_opt_t:
147
+ def __init__(self) -> None: ...
148
+
149
+ pack: bool
150
+
151
+ fix_branches: bool
152
+
153
+ fix_memory: bool
154
+
155
+ fix_relocations: bool
156
+
157
+ fix_objc: bool
158
+
159
+ create_dyld_chained_fixup_cmd: bool
160
+
161
+ @property
162
+ def path(self) -> str: ...
163
+
164
+ @property
165
+ def address(self) -> int: ...
166
+
167
+ @property
168
+ def modtime(self) -> int: ...
169
+
170
+ @property
171
+ def inode(self) -> int: ...
172
+
173
+ @property
174
+ def padding(self) -> int: ...
175
+
176
+ def get(self, opt: Dylib.extract_opt_t = ...) -> Optional[lief.MachO.Binary]: ...
177
+
178
+ class MappingInfo:
179
+ @property
180
+ def address(self) -> int: ...
181
+
182
+ @property
183
+ def size(self) -> int: ...
184
+
185
+ @property
186
+ def end_address(self) -> int: ...
187
+
188
+ @property
189
+ def file_offset(self) -> int: ...
190
+
191
+ @property
192
+ def max_prot(self) -> int: ...
193
+
194
+ @property
195
+ def init_prot(self) -> int: ...
196
+
197
+ class SubCache:
198
+ @property
199
+ def uuid(self) -> list[int]: ...
200
+
201
+ @property
202
+ def vm_offset(self) -> int: ...
203
+
204
+ @property
205
+ def suffix(self) -> str: ...
206
+
207
+ @property
208
+ def cache(self) -> Optional[DyldSharedCache]: ...
209
+
210
+ @overload
211
+ def enable_cache() -> bool: ...
212
+
213
+ @overload
214
+ def enable_cache(target_cache_dir: str) -> bool: ...
215
+
216
+ @overload
217
+ def load(files: Sequence[str]) -> Optional[DyldSharedCache]: ...
218
+
219
+ @overload
220
+ def load(path: os.PathLike, arch: str = '') -> Optional[DyldSharedCache]: ...
@@ -0,0 +1,292 @@
1
+ import enum
2
+ from typing import Iterator, Optional, Union, overload
3
+
4
+ from . import parameters as parameters, types as types
5
+ import lief
6
+
7
+
8
+ class CompilationUnit:
9
+ class Language:
10
+ class LANG(enum.Enum):
11
+ @staticmethod
12
+ def from_value(arg: int, /) -> CompilationUnit.Language.LANG: ...
13
+
14
+ def __eq__(self, arg, /) -> bool: ...
15
+
16
+ def __ne__(self, arg, /) -> bool: ...
17
+
18
+ def __int__(self) -> int: ...
19
+
20
+ UNKNOWN = 0
21
+
22
+ C = 1
23
+
24
+ CPP = 2
25
+
26
+ RUST = 3
27
+
28
+ DART = 4
29
+
30
+ MODULA = 5
31
+
32
+ FORTRAN = 6
33
+
34
+ SWIFT = 7
35
+
36
+ D = 8
37
+
38
+ JAVA = 9
39
+
40
+ COBOL = 10
41
+
42
+ lang: lief.dwarf.CompilationUnit.Language.LANG
43
+
44
+ version: int
45
+
46
+ @property
47
+ def name(self) -> str: ...
48
+
49
+ @property
50
+ def producer(self) -> str: ...
51
+
52
+ @property
53
+ def compilation_dir(self) -> str: ...
54
+
55
+ @property
56
+ def language(self) -> CompilationUnit.Language: ...
57
+
58
+ @property
59
+ def low_address(self) -> int: ...
60
+
61
+ @property
62
+ def high_address(self) -> int: ...
63
+
64
+ @property
65
+ def size(self) -> int: ...
66
+
67
+ @property
68
+ def ranges(self) -> list[lief.range_t]: ...
69
+
70
+ @overload
71
+ def find_function(self, name: str) -> Optional[Function]: ...
72
+
73
+ @overload
74
+ def find_function(self, addr: int) -> Optional[Function]: ...
75
+
76
+ @overload
77
+ def find_variable(self, addr: int) -> Optional[Variable]: ...
78
+
79
+ @overload
80
+ def find_variable(self, name: str) -> Optional[Variable]: ...
81
+
82
+ @property
83
+ def types(self) -> Iterator[Optional[Type]]: ...
84
+
85
+ @property
86
+ def functions(self) -> Iterator[Optional[Function]]: ...
87
+
88
+ @property
89
+ def imported_functions(self) -> Iterator[Optional[Function]]: ...
90
+
91
+ @property
92
+ def variables(self) -> Iterator[Optional[Variable]]: ...
93
+
94
+ class DebugInfo(lief.DebugInfo):
95
+ @overload
96
+ def find_function(self, name: str) -> Optional[Function]: ...
97
+
98
+ @overload
99
+ def find_function(self, addr: int) -> Optional[Function]: ...
100
+
101
+ @overload
102
+ def find_variable(self, addr: int) -> Optional[Variable]: ...
103
+
104
+ @overload
105
+ def find_variable(self, name: str) -> Optional[Variable]: ...
106
+
107
+ def find_type(self, name: str) -> Optional[Type]: ...
108
+
109
+ @property
110
+ def compilation_units(self) -> Iterator[Optional[CompilationUnit]]: ...
111
+
112
+ class Function:
113
+ @property
114
+ def name(self) -> str: ...
115
+
116
+ @property
117
+ def linkage_name(self) -> str: ...
118
+
119
+ @property
120
+ def address(self) -> Optional[int]: ...
121
+
122
+ @property
123
+ def variables(self) -> Iterator[Optional[Variable]]: ...
124
+
125
+ @property
126
+ def is_artificial(self) -> bool: ...
127
+
128
+ @property
129
+ def is_external(self) -> bool: ...
130
+
131
+ @property
132
+ def size(self) -> int: ...
133
+
134
+ @property
135
+ def ranges(self) -> list[lief.range_t]: ...
136
+
137
+ @property
138
+ def debug_location(self) -> lief.debug_location_t: ...
139
+
140
+ @property
141
+ def type(self) -> Optional[Type]: ...
142
+
143
+ @property
144
+ def parameters(self) -> list[Optional[Parameter]]: ...
145
+
146
+ @property
147
+ def thrown_types(self) -> list[Optional[Type]]: ...
148
+
149
+ @property
150
+ def scope(self) -> Optional[Scope]: ...
151
+
152
+ @property
153
+ def instructions(self) -> Iterator[Optional[lief.assembly.Instruction]]: ...
154
+
155
+ class Parameter:
156
+ @property
157
+ def name(self) -> str: ...
158
+
159
+ @property
160
+ def type(self) -> Optional[Type]: ...
161
+
162
+ class Scope:
163
+ class TYPE(enum.Enum):
164
+ UNKNOWN = 0
165
+
166
+ UNION = 1
167
+
168
+ CLASS = 2
169
+
170
+ STRUCT = 3
171
+
172
+ NAMESPACE = 4
173
+
174
+ FUNCTION = 5
175
+
176
+ COMPILATION_UNIT = 6
177
+
178
+ @property
179
+ def name(self) -> str: ...
180
+
181
+ @property
182
+ def parent(self) -> Optional[Scope]: ...
183
+
184
+ @property
185
+ def type(self) -> Scope.TYPE: ...
186
+
187
+ def chained(self, sep: str = '::') -> str: ...
188
+
189
+ class Type:
190
+ class KIND(enum.Enum):
191
+ UNKNOWN = 0
192
+
193
+ UNSPECIFIED = 1
194
+
195
+ BASE = 2
196
+
197
+ CONST_KIND = 3
198
+
199
+ CLASS = 4
200
+
201
+ ARRAY = 5
202
+
203
+ POINTER = 6
204
+
205
+ STRUCT = 7
206
+
207
+ UNION = 8
208
+
209
+ TYPEDEF = 9
210
+
211
+ REF = 10
212
+
213
+ SET_TYPE = 11
214
+
215
+ STRING = 12
216
+
217
+ SUBROUTINE = 13
218
+
219
+ POINTER_MEMBER = 14
220
+
221
+ PACKED = 15
222
+
223
+ FILE = 16
224
+
225
+ THROWN = 17
226
+
227
+ VOLATILE = 18
228
+
229
+ RESTRICT = 19
230
+
231
+ INTERFACE = 20
232
+
233
+ SHARED = 21
234
+
235
+ RVALREF = 22
236
+
237
+ TEMPLATE_ALIAS = 23
238
+
239
+ COARRAY = 24
240
+
241
+ DYNAMIC = 25
242
+
243
+ ATOMIC = 26
244
+
245
+ IMMUTABLE = 27
246
+
247
+ ENUM = 28
248
+
249
+ @property
250
+ def kind(self) -> Type.KIND: ...
251
+
252
+ @property
253
+ def name(self) -> Optional[str]: ...
254
+
255
+ @property
256
+ def size(self) -> Optional[int]: ...
257
+
258
+ @property
259
+ def location(self) -> lief.debug_location_t: ...
260
+
261
+ @property
262
+ def is_unspecified(self) -> bool: ...
263
+
264
+ @property
265
+ def scope(self) -> Optional[Scope]: ...
266
+
267
+ class Variable:
268
+ @property
269
+ def name(self) -> str: ...
270
+
271
+ @property
272
+ def linkage_name(self) -> str: ...
273
+
274
+ @property
275
+ def address(self) -> Optional[int]: ...
276
+
277
+ @property
278
+ def size(self) -> Optional[int]: ...
279
+
280
+ @property
281
+ def is_constexpr(self) -> bool: ...
282
+
283
+ @property
284
+ def debug_location(self) -> lief.debug_location_t: ...
285
+
286
+ @property
287
+ def type(self) -> Optional[Type]: ...
288
+
289
+ @property
290
+ def scope(self) -> Optional[Scope]: ...
291
+
292
+ def load(path: str) -> Optional[DebugInfo]: ...
@@ -0,0 +1,14 @@
1
+ from typing import Iterator, Optional, Union
2
+
3
+ import lief
4
+
5
+
6
+ class Formal(lief.dwarf.Parameter):
7
+ @property
8
+ def type(self) -> Optional[lief.dwarf.Type]: ...
9
+
10
+ class TemplateType(lief.dwarf.Parameter):
11
+ pass
12
+
13
+ class TemplateValue(lief.dwarf.Parameter):
14
+ pass
@@ -0,0 +1,167 @@
1
+ import enum
2
+ from typing import Iterator, Optional, Union as _Union
3
+
4
+ import lief
5
+
6
+
7
+ class Array(lief.dwarf.Type):
8
+ class size_info_t:
9
+ @property
10
+ def type(self) -> lief.dwarf.Type: ...
11
+
12
+ @property
13
+ def name(self) -> str: ...
14
+
15
+ @property
16
+ def size(self) -> int: ...
17
+
18
+ @property
19
+ def underlying_type(self) -> lief.dwarf.Type: ...
20
+
21
+ @property
22
+ def size_info(self) -> Array.size_info_t: ...
23
+
24
+ class Atomic(lief.dwarf.Type):
25
+ @property
26
+ def underlying_type(self) -> lief.dwarf.Type: ...
27
+
28
+ class Base(lief.dwarf.Type):
29
+ class ENCODING(enum.Enum):
30
+ NONE = 0
31
+
32
+ SIGNED = 1
33
+
34
+ SIGNED_CHAR = 2
35
+
36
+ UNSIGNED = 3
37
+
38
+ UNSIGNED_CHAR = 4
39
+
40
+ FLOAT = 5
41
+
42
+ BOOLEAN = 6
43
+
44
+ ADDRESS = 7
45
+
46
+ @property
47
+ def encoding(self) -> Base.ENCODING: ...
48
+
49
+ class Class(ClassLike):
50
+ pass
51
+
52
+ class ClassLike(lief.dwarf.Type):
53
+ class Member:
54
+ @property
55
+ def name(self) -> str: ...
56
+
57
+ @property
58
+ def type(self) -> Optional[lief.dwarf.Type]: ...
59
+
60
+ @property
61
+ def is_external(self) -> bool: ...
62
+
63
+ @property
64
+ def is_declaration(self) -> bool: ...
65
+
66
+ @property
67
+ def offset(self) -> Optional[int]: ...
68
+
69
+ @property
70
+ def bit_offset(self) -> Optional[int]: ...
71
+
72
+ @property
73
+ def members(self) -> list[ClassLike.Member]: ...
74
+
75
+ def find_member(self, offset: int) -> Optional[ClassLike.Member]: ...
76
+
77
+ @property
78
+ def functions(self) -> Iterator[Optional[lief.dwarf.Function]]: ...
79
+
80
+ class Coarray(lief.dwarf.Type):
81
+ pass
82
+
83
+ class Const(lief.dwarf.Type):
84
+ @property
85
+ def underlying_type(self) -> lief.dwarf.Type: ...
86
+
87
+ class Dynamic(lief.dwarf.Type):
88
+ pass
89
+
90
+ class Enum(lief.dwarf.Type):
91
+ pass
92
+
93
+ class File(lief.dwarf.Type):
94
+ pass
95
+
96
+ class Immutable(lief.dwarf.Type):
97
+ @property
98
+ def underlying_type(self) -> lief.dwarf.Type: ...
99
+
100
+ class Interface(lief.dwarf.Type):
101
+ pass
102
+
103
+ class Packed(ClassLike):
104
+ pass
105
+
106
+ class Pointer(lief.dwarf.Type):
107
+ @property
108
+ def underlying_type(self) -> lief.dwarf.Type: ...
109
+
110
+ class PointerToMember(lief.dwarf.Type):
111
+ @property
112
+ def underlying_type(self) -> lief.dwarf.Type: ...
113
+
114
+ @property
115
+ def containing_type(self) -> Optional[lief.dwarf.Type]: ...
116
+
117
+ class RValueReference(lief.dwarf.Type):
118
+ @property
119
+ def underlying_type(self) -> lief.dwarf.Type: ...
120
+
121
+ class Reference(lief.dwarf.Type):
122
+ @property
123
+ def underlying_type(self) -> lief.dwarf.Type: ...
124
+
125
+ class Restrict(lief.dwarf.Type):
126
+ @property
127
+ def underlying_type(self) -> lief.dwarf.Type: ...
128
+
129
+ class SetTy(lief.dwarf.Type):
130
+ @property
131
+ def underlying_type(self) -> lief.dwarf.Type: ...
132
+
133
+ class Shared(lief.dwarf.Type):
134
+ @property
135
+ def underlying_type(self) -> lief.dwarf.Type: ...
136
+
137
+ class StringTy(lief.dwarf.Type):
138
+ pass
139
+
140
+ class Structure(ClassLike):
141
+ pass
142
+
143
+ class Subroutine(lief.dwarf.Type):
144
+ @property
145
+ def parameters(self) -> list[Optional[lief.dwarf.Parameter]]: ...
146
+
147
+ class TemplateAlias(lief.dwarf.Type):
148
+ @property
149
+ def parameters(self) -> list[Optional[lief.dwarf.Parameter]]: ...
150
+
151
+ @property
152
+ def underlying_type(self) -> lief.dwarf.Type: ...
153
+
154
+ class Thrown(lief.dwarf.Type):
155
+ @property
156
+ def underlying_type(self) -> lief.dwarf.Type: ...
157
+
158
+ class Typedef(lief.dwarf.Type):
159
+ @property
160
+ def underlying_type(self) -> lief.dwarf.Type: ...
161
+
162
+ class Union(ClassLike):
163
+ pass
164
+
165
+ class Volatile(lief.dwarf.Type):
166
+ @property
167
+ def underlying_type(self) -> lief.dwarf.Type: ...