yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Sam EstepMake LLDB IR data formatters more robust (#7927)d9851d4e4

master
20.0 KiB581 linesraw
1# This file holds (incomplete) Python type stubs for LLDB v19.1.7:
2# https://lldb.llvm.org/python_api.html
3
4# The API includes many docstrings which describe the type signatures of
5# functions, but these are not in a format that can be read by Python
6# type checking tools. This has been requested upstream, but seems to be
7# blocked because SWIG (the tool used to generate the LLDB Python
8# bindings) doees not support generating Python type hints:
9# https://github.com/llvm/llvm-project/issues/79043
10
11# For another example of a project that takes the same approach for LLDB
12# Python types, see the mongo-c-driver repo:
13# https://github.com/mongodb/mongo-c-driver/blob/2.0.2/lldb.pyi
14
15# The classes in this file, along with the members in each class, are
16# listed in the same order as the autogenerated `lldb/__init__.py` file
17# distributed with LLVM:
18# https://packages.debian.org/sid/amd64/python3-lldb-19/filelist
19
20# This file should not impose a maintenance burden, because although not
21# all classes are present and not all methods are fully typed, each
22# present class has all its members listed. As a result, language
23# servers like Pylance don't give spurious errors about missing members,
24# and can simply report types as "unknown" for methods that have not
25# been annotated yet. Thus, when adding a new class to this file, be
26# sure to include all its members, but don't feel required to include
27# types for everything unless you want to.
28
29from typing import Sequence
30
31class SBData:
32    @property
33    def thisown(self): ...
34    def __init__(self, *args): ...
35    def GetAddressByteSize(self): ...
36    def SetAddressByteSize(self, addr_byte_size): ...
37    def Clear(self): ...
38    def __nonzero__(self): ...
39    def __bool__(self): ...
40    def IsValid(self): ...
41    def GetByteSize(self): ...
42    def GetByteOrder(self): ...
43    def SetByteOrder(self, endian): ...
44    def GetFloat(self, error, offset): ...
45    def GetDouble(self, error, offset): ...
46    def GetLongDouble(self, error, offset): ...
47    def GetAddress(self, error, offset): ...
48    def GetUnsignedInt8(self, error, offset): ...
49    def GetUnsignedInt16(self, error, offset): ...
50    def GetUnsignedInt32(self, error, offset): ...
51    def GetUnsignedInt64(self, error, offset): ...
52    def GetSignedInt8(self, error, offset): ...
53    def GetSignedInt16(self, error, offset): ...
54    def GetSignedInt32(self, error, offset): ...
55    def GetSignedInt64(self, error, offset): ...
56    def GetString(self, error, offset): ...
57    def ReadRawData(self, error, offset, buf): ...
58    def GetDescription(self, *args): ...
59    def SetData(self, error, buf, endian, addr_size): ...
60    def SetDataWithOwnership(self, error, buf, endian, addr_size): ...
61    def Append(self, rhs): ...
62    @staticmethod
63    def CreateDataFromCString(endian, addr_byte_size, data): ...
64    @staticmethod
65    def CreateDataFromUInt64Array(endian, addr_byte_size, array): ...
66    @staticmethod
67    def CreateDataFromUInt32Array(endian, addr_byte_size, array): ...
68    @staticmethod
69    def CreateDataFromSInt64Array(endian, addr_byte_size, array): ...
70    @staticmethod
71    def CreateDataFromSInt32Array(endian, addr_byte_size, array): ...
72    @staticmethod
73    def CreateDataFromDoubleArray(endian, addr_byte_size, array): ...
74    def SetDataFromCString(self, data): ...
75    def SetDataFromUInt64Array(self, array): ...
76    def SetDataFromUInt32Array(self, array): ...
77    def SetDataFromSInt64Array(self, array): ...
78    def SetDataFromSInt32Array(self, array): ...
79    def SetDataFromDoubleArray(self, array): ...
80    def __repr__(self) -> str: ...
81    def __len__(self): ...
82    @classmethod
83    def CreateDataFromInt(
84        cls, value, size=None, target=None, ptr_size=None, endian=None
85    ): ...
86    def _make_helper(self, sbdata, getfunc, itemsize): ...
87    def _make_helper_uint8(self): ...
88    def _make_helper_uint16(self): ...
89    def _make_helper_uint32(self): ...
90    def _make_helper_uint64(self): ...
91    def _make_helper_sint8(self): ...
92    def _make_helper_sint16(self): ...
93    def _make_helper_sint32(self): ...
94    def _make_helper_sint64(self): ...
95    def _make_helper_float(self): ...
96    def _make_helper_double(self): ...
97    def _read_all_uint8(self): ...
98    def _read_all_uint16(self): ...
99    def _read_all_uint32(self): ...
100    def _read_all_uint64(self): ...
101    def _read_all_sint8(self): ...
102    def _read_all_sint16(self): ...
103    def _read_all_sint32(self): ...
104    def _read_all_sint64(self): ...
105    def _read_all_float(self): ...
106    def _read_all_double(self): ...
107    @property
108    def uint8(self) -> Sequence[int]: ...
109    @property
110    def uint16(self): ...
111    @property
112    def uint32(self): ...
113    @property
114    def uint64(self): ...
115    @property
116    def sint8(self): ...
117    @property
118    def sint16(self): ...
119    @property
120    def sint32(self): ...
121    @property
122    def sint64(self): ...
123    @property
124    def float(self): ...
125    @property
126    def double(self): ...
127    @property
128    def uint8s(self): ...
129    @property
130    def uint16s(self): ...
131    @property
132    def uint32s(self): ...
133    @property
134    def uint64s(self): ...
135    @property
136    def sint8s(self): ...
137    @property
138    def sint16s(self): ...
139    @property
140    def sint32s(self): ...
141    @property
142    def sint64s(self): ...
143    @property
144    def floats(self): ...
145    @property
146    def doubles(self): ...
147    @property
148    def byte_order(self): ...
149    @property
150    def size(self): ...
151
152class SBDebugger:
153    def HandleCommand(self, command: str) -> None: ...
154
155class SBTarget:
156    @property
157    def thisown(self): ...
158    @property
159    def eBroadcastBitBreakpointChanged(self): ...
160    @property
161    def eBroadcastBitModulesLoaded(self): ...
162    @property
163    def eBroadcastBitModulesUnloaded(self): ...
164    @property
165    def eBroadcastBitWatchpointChanged(self): ...
166    @property
167    def eBroadcastBitSymbolsLoaded(self): ...
168    @property
169    def eBroadcastBitSymbolsChanged(self): ...
170    def __init__(self, *args): ...
171    @property
172    def __swig_destroy__(self): ...
173    def __nonzero__(self): ...
174    __bool__ = __nonzero__
175    def IsValid(self): ...
176    def EventIsTargetEvent(event): ...
177    def GetTargetFromEvent(event): ...
178    def GetNumModulesFromEvent(event): ...
179    def GetModuleAtIndexFromEvent(idx, event): ...
180    def GetBroadcasterClassName(): ...
181    def GetProcess(self): ...
182    def SetCollectingStats(self, v): ...
183    def GetCollectingStats(self): ...
184    def GetStatistics(self, *args): ...
185    def GetPlatform(self): ...
186    def GetEnvironment(self): ...
187    def Install(self): ...
188    def LoadCore(self, *args): ...
189    def LaunchSimple(self, argv, envp, working_directory): ...
190    def Launch(self, *args): ...
191    def Attach(self, attach_info, error): ...
192    def AttachToProcessWithID(self, listener, pid, error): ...
193    def AttachToProcessWithName(self, listener, name, wait_for, error): ...
194    def ConnectRemote(self, listener, url, plugin_name, error): ...
195    def GetExecutable(self): ...
196    def AppendImageSearchPath(self, _from, to, error): ...
197    def AddModule(self, *args): ...
198    def GetNumModules(self): ...
199    def GetModuleAtIndex(self, idx): ...
200    def RemoveModule(self, module): ...
201    def GetDebugger(self): ...
202    def FindModule(self, file_spec): ...
203    def FindCompileUnits(self, sb_file_spec): ...
204    def GetByteOrder(self): ...
205    def GetAddressByteSize(self): ...
206    def GetTriple(self): ...
207    def GetABIName(self): ...
208    def GetLabel(self): ...
209    def SetLabel(self, label): ...
210    def GetDataByteSize(self): ...
211    def GetCodeByteSize(self): ...
212    def GetMaximumNumberOfChildrenToDisplay(self): ...
213    def SetSectionLoadAddress(self, section, section_base_addr): ...
214    def ClearSectionLoadAddress(self, section): ...
215    def SetModuleLoadAddress(self, module, sections_offset): ...
216    def ClearModuleLoadAddress(self, module): ...
217    def FindFunctions(self, *args): ...
218    def FindFirstGlobalVariable(self, name): ...
219    def FindGlobalVariables(self, *args): ...
220    def FindGlobalFunctions(self, name, max_matches, matchtype): ...
221    def Clear(self): ...
222    def ResolveFileAddress(self, file_addr): ...
223    def ResolveLoadAddress(self, vm_addr): ...
224    def ResolvePastLoadAddress(self, stop_id, vm_addr): ...
225    def ResolveSymbolContextForAddress(self, addr, resolve_scope): ...
226    def ReadMemory(self, addr, buf, error): ...
227    def BreakpointCreateByLocation(self, *args): ...
228    def BreakpointCreateByName(self, *args): ...
229    def BreakpointCreateByNames(self, *args): ...
230    def BreakpointCreateByRegex(self, *args): ...
231    def BreakpointCreateBySourceRegex(self, *args): ...
232    def BreakpointCreateForException(self, language, catch_bp, throw_bp): ...
233    def BreakpointCreateByAddress(self, address): ...
234    def BreakpointCreateBySBAddress(self, address): ...
235    def BreakpointCreateFromScript(
236        self, class_name, extra_args, module_list, file_list, request_hardware=False
237    ): ...
238    def BreakpointsCreateFromFile(self, *args): ...
239    def BreakpointsWriteToFile(self, *args): ...
240    def GetNumBreakpoints(self): ...
241    def GetBreakpointAtIndex(self, idx): ...
242    def BreakpointDelete(self, break_id): ...
243    def FindBreakpointByID(self, break_id): ...
244    def FindBreakpointsByName(self, name, bkpt_list): ...
245    def GetBreakpointNames(self, names): ...
246    def DeleteBreakpointName(self, name): ...
247    def EnableAllBreakpoints(self): ...
248    def DisableAllBreakpoints(self): ...
249    def DeleteAllBreakpoints(self): ...
250    def GetNumWatchpoints(self): ...
251    def GetWatchpointAtIndex(self, idx): ...
252    def DeleteWatchpoint(self, watch_id): ...
253    def FindWatchpointByID(self, watch_id): ...
254    def WatchAddress(self, addr, size, read, modify, error): ...
255    def WatchpointCreateByAddress(self, addr, size, options, error): ...
256    def EnableAllWatchpoints(self): ...
257    def DisableAllWatchpoints(self): ...
258    def DeleteAllWatchpoints(self): ...
259    def GetBroadcaster(self): ...
260    def FindFirstType(self, type: str) -> SBType: ...
261    def FindTypes(self, type): ...
262    def GetBasicType(self, type): ...
263    def CreateValueFromAddress(self, name, addr, type): ...
264    def CreateValueFromData(self, name, data, type): ...
265    def CreateValueFromExpression(self, name, expr): ...
266    def GetSourceManager(self): ...
267    def ReadInstructions(self, *args): ...
268    def GetInstructions(self, base_addr, buf): ...
269    def GetInstructionsWithFlavor(self, base_addr, flavor_string, buf): ...
270    def FindSymbols(self, *args): ...
271    def __eq__(self, rhs) -> bool: ...
272    def __ne__(self, rhs) -> bool: ...
273    def GetDescription(self, description, description_level): ...
274    def EvaluateExpression(self, *args): ...
275    def GetStackRedZoneSize(self): ...
276    def IsLoaded(self, module): ...
277    def GetLaunchInfo(self): ...
278    def SetLaunchInfo(self, launch_info): ...
279    def GetTrace(self): ...
280    def CreateTrace(self, error): ...
281    def __repr__(self) -> str: ...
282    def get_modules_access_object(self): ...
283    def get_modules_array(self): ...
284    def module_iter(self): ...
285    def breakpoint_iter(self): ...
286    def get_bkpts_access_object(self): ...
287    def get_target_bkpts(self): ...
288    def watchpoint_iter(self): ...
289    def get_watchpoints_access_object(self): ...
290    def get_target_watchpoints(self): ...
291    @property
292    def modules(self): ...
293    @property
294    def module(self): ...
295    @property
296    def process(self): ...
297    @property
298    def executable(self): ...
299    @property
300    def debugger(self): ...
301    @property
302    def num_breakpoints(self): ...
303    @property
304    def breakpoints(self): ...
305    @property
306    def breakpoint(self): ...
307    @property
308    def num_watchpoints(self): ...
309    @property
310    def watchpoints(self): ...
311    @property
312    def watchpoint(self): ...
313    @property
314    def broadcaster(self): ...
315    @property
316    def byte_order(self): ...
317    @property
318    def addr_size(self): ...
319    @property
320    def triple(self): ...
321    @property
322    def data_byte_size(self): ...
323    @property
324    def code_byte_size(self): ...
325    @property
326    def platform(self): ...
327
328class SBType:
329    @property
330    def thisown(self): ...
331    def __init__(self, *args): ...
332    def __nonzero__(self): ...
333    def IsValid(self): ...
334    def GetByteSize(self) -> int: ...
335    def GetByteAlign(self): ...
336    def IsPointerType(self) -> bool: ...
337    def IsReferenceType(self): ...
338    def IsFunctionType(self): ...
339    def IsPolymorphicClass(self): ...
340    def IsArrayType(self): ...
341    def IsVectorType(self): ...
342    def IsTypedefType(self): ...
343    def IsAnonymousType(self): ...
344    def IsScopedEnumerationType(self): ...
345    def IsAggregateType(self): ...
346    def GetPointerType(self): ...
347    def GetPointeeType(self) -> SBType: ...
348    def GetReferenceType(self): ...
349    def GetTypedefedType(self): ...
350    def GetDereferencedType(self): ...
351    def GetUnqualifiedType(self): ...
352    def GetArrayElementType(self) -> SBType: ...
353    def GetArrayType(self, size): ...
354    def GetVectorElementType(self): ...
355    def GetCanonicalType(self): ...
356    def GetEnumerationIntegerType(self): ...
357    def GetBasicType(self, *args): ...
358    def GetNumberOfFields(self): ...
359    def GetNumberOfDirectBaseClasses(self): ...
360    def GetNumberOfVirtualBaseClasses(self): ...
361    def GetFieldAtIndex(self, idx): ...
362    def GetDirectBaseClassAtIndex(self, idx): ...
363    def GetVirtualBaseClassAtIndex(self, idx): ...
364    def GetStaticFieldWithName(self, name): ...
365    def GetEnumMembers(self): ...
366    def GetNumberOfTemplateArguments(self): ...
367    def GetTemplateArgumentType(self, idx): ...
368    def GetTemplateArgumentKind(self, idx): ...
369    def GetFunctionReturnType(self): ...
370    def GetFunctionArgumentTypes(self): ...
371    def GetNumberOfMemberFunctions(self): ...
372    def GetMemberFunctionAtIndex(self, idx): ...
373    def GetModule(self): ...
374    def GetName(self): ...
375    def GetDisplayTypeName(self): ...
376    def GetTypeClass(self): ...
377    def IsTypeComplete(self): ...
378    def GetTypeFlags(self): ...
379    def GetDescription(self, description, description_level): ...
380    def FindDirectNestedType(self, name): ...
381    def __eq__(self, rhs): ...
382    def __ne__(self, rhs): ...
383    def __repr__(self): ...
384    def template_arg_array(self): ...
385    def __len__(self): ...
386    @property
387    def module(self): ...
388    @property
389    def name(self): ...
390    @property
391    def size(self): ...
392    @property
393    def is_pointer(self): ...
394    @property
395    def is_reference(self): ...
396    @property
397    def num_fields(self): ...
398    @property
399    def num_bases(self): ...
400    @property
401    def num_vbases(self): ...
402    @property
403    def num_template_args(self): ...
404    @property
405    def template_args(self): ...
406    @property
407    def type(self): ...
408    @property
409    def is_complete(self): ...
410    def get_bases_array(self): ...
411    def get_vbases_array(self): ...
412    def get_fields_array(self): ...
413    def get_members_array(self): ...
414    def get_enum_members_array(self): ...
415    @property
416    def bases(self): ...
417    @property
418    def vbases(self): ...
419    @property
420    def fields(self): ...
421    @property
422    def members(self): ...
423    @property
424    def enum_members(self): ...
425
426class SBValue:
427    @property
428    def thisown(self): ...
429    def __init__(self, *args): ...
430    def __nonzero__(self): ...
431    def IsValid(self): ...
432    def Clear(self): ...
433    def GetError(self): ...
434    def GetID(self): ...
435    def GetName(self) -> str: ...
436    def GetTypeName(self): ...
437    def GetDisplayTypeName(self): ...
438    def GetByteSize(self): ...
439    def IsInScope(self): ...
440    def GetFormat(self): ...
441    def SetFormat(self, format): ...
442    def GetValue(self) -> str: ...
443    def GetValueAsSigned(self, *args): ...
444    def GetValueAsUnsigned(self, fail_value: int = 0) -> int: ...
445    def GetValueAsAddress(self): ...
446    def GetValueType(self): ...
447    def GetValueDidChange(self): ...
448    def GetSummary(self, *args): ...
449    def GetObjectDescription(self): ...
450    def GetDynamicValue(self, use_dynamic): ...
451    def GetStaticValue(self): ...
452    def GetNonSyntheticValue(self) -> SBValue: ...
453    def GetSyntheticValue(self): ...
454    def GetPreferDynamicValue(self): ...
455    def SetPreferDynamicValue(self, use_dynamic): ...
456    def GetPreferSyntheticValue(self): ...
457    def SetPreferSyntheticValue(self, use_synthetic): ...
458    def IsDynamic(self): ...
459    def IsSynthetic(self): ...
460    def IsSyntheticChildrenGenerated(self): ...
461    def SetSyntheticChildrenGenerated(self, arg2): ...
462    def GetLocation(self): ...
463    def SetValueFromCString(self, *args): ...
464    def GetTypeFormat(self): ...
465    def GetTypeSummary(self): ...
466    def GetTypeFilter(self): ...
467    def GetTypeSynthetic(self): ...
468    def CreateChildAtOffset(self, name: str, offset: int, type: SBType) -> SBValue: ...
469    def Cast(self, type: SBType) -> SBValue: ...
470    def CreateValueFromExpression(self, *args): ...
471    def CreateValueFromAddress(self, name, address, type): ...
472    def CreateValueFromData(self, name, data, type): ...
473    def GetChildAtIndex(self, idx: int) -> SBValue: ...
474    def GetIndexOfChildWithName(self, name): ...
475    def GetChildMemberWithName(self, name: str) -> SBValue: ...
476    def GetValueForExpressionPath(self, expr_path): ...
477    def AddressOf(self): ...
478    def GetLoadAddress(self): ...
479    def GetAddress(self): ...
480    def GetPointeeData(self, item_idx: int = 0, item_count: int = 1) -> SBData: ...
481    def GetData(self): ...
482    def SetData(self, data, error): ...
483    def Clone(self, new_name: str) -> SBValue: ...
484    def GetDeclaration(self): ...
485    def MightHaveChildren(self): ...
486    def IsRuntimeSupportValue(self): ...
487    def GetNumChildren(self, max: int | None = None) -> int: ...
488    def GetOpaqueType(self): ...
489    def GetTarget(self): ...
490    def GetProcess(self): ...
491    def GetThread(self): ...
492    def GetFrame(self): ...
493    def Dereference(self) -> SBValue: ...
494    def TypeIsPointerType(self): ...
495    def GetType(self) -> SBType: ...
496    def Persist(self): ...
497    def GetDescription(self, description): ...
498    def GetExpressionPath(self, *args): ...
499    def EvaluateExpression(self, *args): ...
500    def Watch(self, *args): ...
501    def WatchPointee(self, resolve_location, read, write, error): ...
502    def GetVTable(self): ...
503    def __repr__(self): ...
504    def __get_dynamic__(self): ...
505    def get_child_access_object(self): ...
506    def get_value_child_list(self): ...
507    def __hex__(self): ...
508    def __iter__(self): ...
509    def __len__(self): ...
510    @property
511    def children(self) -> list[SBValue]: ...
512    @property
513    def child(self): ...
514    @property
515    def name(self) -> str: ...
516    @property
517    def type(self) -> SBType: ...
518    @property
519    def size(self): ...
520    @property
521    def is_in_scope(self): ...
522    @property
523    def format(self): ...
524    @property
525    def value(self) -> str: ...
526    @property
527    def value_type(self): ...
528    @property
529    def changed(self): ...
530    @property
531    def data(self): ...
532    @property
533    def load_addr(self): ...
534    @property
535    def addr(self): ...
536    @property
537    def deref(self) -> SBValue: ...
538    @property
539    def address_of(self) -> SBValue: ...
540    @property
541    def error(self): ...
542    @property
543    def summary(self) -> str: ...
544    @property
545    def description(self): ...
546    @property
547    def dynamic(self): ...
548    @property
549    def location(self): ...
550    @property
551    def target(self) -> SBTarget: ...
552    @property
553    def process(self): ...
554    @property
555    def thread(self): ...
556    @property
557    def frame(self): ...
558    @property
559    def num_children(self): ...
560    @property
561    def unsigned(self) -> int: ...
562    @property
563    def signed(self): ...
564    def get_expr_path(self): ...
565    @property
566    def path(self): ...
567    def synthetic_child_from_expression(self, name, expr, options=None): ...
568    def synthetic_child_from_data(self, name, data, type): ...
569    def synthetic_child_from_address(self, name, addr, type): ...
570    def __eol_test(val): ...
571    def linked_list_iter(self, next_item_name, end_of_list_test=__eol_test): ...
572
573class SBSyntheticValueProvider:
574    def __init__(self, valobj: SBValue) -> None: ...
575    def num_children(self) -> int: ...
576    def get_child_index(self, name: str) -> int: ...
577    def get_child_at_index(self, idx: int) -> SBValue | None: ...
578    def update(self) -> bool | None: ...
579    def has_children(self) -> bool: ...
580    def __len__(self) -> int: ...
581    def __iter__(self): ...