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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
|
"""
This Python type stubs file is only here to support checking of lldb_bson.py.
The type/member/constant listings in here are incomplete, as only those that
are used in lldb_bson have been transcribed from the LLDB Python API
documentation. Refer: https://lldb.llvm.org/python_api.html
"""
from typing import IO, Any, Sequence, TypeAlias, NoReturn
_Pointer: TypeAlias = int
_Size: TypeAlias = int
_Offset: TypeAlias = int
_InternalDict: TypeAlias = dict[str, Any]
class SBError:
def __init__(self) -> None: ...
@property
def success(self) -> bool: ...
@property
def fail(self) -> bool: ...
@property
def description(self) -> str: ...
class SBDebugger:
def __init__(self, _: NoReturn) -> None: ...
def HandleCommand(self, command: str) -> None: ...
def GetErrorFileHandle(self) -> IO[str]: ...
def GetSelectedTarget(self) -> SBTarget | None: ...
class SBAddress:
def __init__(self) -> None: ...
@property
def offset(self) -> type: ...
@property
def load_addr(self) -> _Pointer: ...
def SetLoadAddress(self, addr: _Pointer, tgt: SBTarget) -> None: ...
class SBData:
def GetSignedInt32(self, err: SBError, off: _Offset) -> int: ...
@staticmethod
def CreateDataFromUInt64Array(endian: ByteOrderType, size: _Size, dat: Sequence[int]) -> SBData: ...
@staticmethod
def CreateDataFromCString(endian: ByteOrderType, size: _Size, s: str) -> SBData: ...
byte_order: ByteOrderType
@property
def uint8(self) -> Sequence[int]: ...
@property
def uint32(self) -> Sequence[int]: ...
@property
def uint64(self) -> Sequence[int]: ...
@property
def size(self) -> int: ...
def ReadRawData(self, err: SBError, off: _Offset, size: _Size) -> bytes: ...
def GetAddress(self, err: SBError, off: _Offset) -> _Pointer: ...
def GetUnsignedInt32(self, err: SBError, off: _Offset) -> int: ...
def GetUnsignedInt64(self, err: SBError, off: _Offset) -> int: ...
class SBValue:
def Dereference(self) -> SBValue: ...
def TypeIsPointerType(self) -> bool: ...
def GetChildMemberWithName(self, name: str) -> SBValue: ...
def GetValueAsUnsigned(self) -> int: ...
def Cast(self, type: SBType) -> SBValue: ...
def GetAddress(self) -> SBAddress: ...
def GetData(self) -> SBData: ...
def GetNonSyntheticValue(self) -> SBValue: ...
def CreateChildAtOffset(self, name: str, offset: _Offset, type: SBType) -> SBValue: ...
def CreateValueFromData(self, name: str, data: SBData, type: SBType) -> SBValue: ...
def CreateValueFromAddress(self, name: str, addr: _Pointer, type: SBType) -> SBValue: ...
def CreateValueFromExpression(self, name: str, expr: str) -> SBValue: ...
def synthetic_child_from_address(self, name: str, addr: _Pointer, type: SBType) -> SBValue: ...
def synthetic_child_from_expression(self, name: str, expr: str) -> SBValue: ...
@property
def addr(self) -> SBAddress: ...
@property
def frame(self) -> SBFrame: ...
@property
def type(self) -> SBType: ...
@property
def name(self) -> str: ...
@property
def target(self) -> SBTarget: ...
@property
def load_addr(self) -> _Pointer: ...
@property
def size(self) -> int: ...
@property
def unsigned(self) -> int: ...
@property
def data(self) -> SBData: ...
@property
def deref(self) -> SBValue: ...
@property
def process(self) -> SBProcess: ...
@property
def error(self) -> SBError: ...
@property
def changed(self) -> bool: ...
@property
def children(self) -> Sequence[SBValue]: ...
value: str
format: ValueFormatType
class SBFrame:
def FindVariable(self, var_name: str) -> SBValue: ...
def EvaluateExpression(self, expr: str) -> SBValue: ...
@property
def locals(self) -> Sequence[SBValue]: ...
@property
def thread(self) -> SBThread: ...
class SBThread:
@property
def frames(self) -> Sequence[SBFrame]: ...
@property
def process(self) -> SBProcess: ...
class SBProcess:
def ReadMemory(self, addr: _Pointer, size: int, err: SBError) -> bytes: ...
def ReadCStringFromMemory(self, addr: _Pointer, max: int, err: SBError) -> bytes: ...
@property
def selected_thread(self) -> SBThread: ...
@property
def id(self) -> int: ...
class SBCommandReturnObject:
def AppendMessage(self, s: str) -> None: ...
class SBTarget:
def FindFirstType(self, type: str) -> SBType: ...
def CreateValueFromData(self, name: str, data: SBData, type: SBType) -> SBValue: ...
def CreateValueFromExpression(self, name: str, expr: str) -> SBValue: ...
def CreateValueFromAddress(self, name: str, addr: SBAddress, type: SBType) -> SBValue: ...
def GetBasicType(self, type: BasicType) -> SBType: ...
@property
def process(self) -> SBProcess: ...
class SBType:
def GetDisplayTypeName(self) -> str: ...
def GetPointerType(self) -> SBType: ...
def GetArrayType(self, size: int) -> SBType: ...
@property
def name(self) -> str: ...
def IsValid(self) -> bool: ...
@property
def fields(self) -> Sequence[SBTypeMember]: ...
@property
def size(self) -> int: ...
class SBTypeMember:
@property
def name(self) -> str: ...
@property
def byte_offset(self) -> int: ...
class SBSyntheticValueProvider:
def __init__(self, valobj: SBValue, internal_dict: _InternalDict) -> None: ...
def num_children(self) -> int: ...
def get_child_at_index(self, pos: int) -> SBValue: ...
def has_children(self) -> bool: ...
def get_value(self) -> SBValue: ...
def update(self) -> bool | None: ...
# Types not present in lldb, but represent the types of top-level constants:
# (These may only be used in unevaluated contexts)
class ByteOrderType: ...
class ValueFormatType: ...
class BasicType: ...
eBasicTypeNullPtr: BasicType
eBasicTypeUnsignedChar: BasicType
eBasicTypeDouble: BasicType
eBasicTypeBool: BasicType
eBasicTypeChar: BasicType
eBasicTypeUnsignedChar: BasicType
eBasicTypeVoid: BasicType
eFormatDefault: ValueFormatType
eFormatHex: ValueFormatType
eFormatBinary: ValueFormatType
eFormatPointer: ValueFormatType
eFormatInvalid: ValueFormatType
debugger: SBDebugger
|