1
2
3
4
5
6
7
8 """
9 The lldb module contains the public APIs for Python binding.
10
11 Some of the important classes are describe here:
12
13 o SBTarget: Represents the target program running under the debugger.
14 o SBProcess: Represents the process associated with the target program.
15 o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
16 o SBFrame: Represents one of the stack frames associated with a thread. SBThread
17 contains SBFrame(s).
18 o SBSymbolContext: A container that stores various debugger related info.
19 o SBValue: Represents the value of a variable, a register, or an expression.
20 o SBModule: Represents an executable image and its associated object and symbol
21 files. SBTarget conatins SBModule(s).
22 o SBBreakpoint: Represents a logical breakpoint and its associated settings.
23 SBTarget conatins SBBreakpoint(s).
24 o SBSymbol: Represents the symbol possibly associated with a stack frame.
25 o SBCompileUnit: Represents a compilation unit, or compiled source file.
26 o SBFunction: Represents a generic function, which can be inlined or not.
27 o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
28 o SBLineEntry: Specifies an association with a contiguous range of instructions
29 and a source file location. SBCompileUnit contains SBLineEntry(s).
30 """
31
32
33 from sys import version_info
34 if version_info >= (2,6,0):
36 from os.path import dirname
37 import imp
38 fp = None
39 try:
40 fp, pathname, description = imp.find_module('_lldb', [dirname(__file__)])
41 except ImportError:
42 import _lldb
43 return _lldb
44 if fp is not None:
45 try:
46 _mod = imp.load_module('_lldb', fp, pathname, description)
47 finally:
48 fp.close()
49 return _mod
50 _lldb = swig_import_helper()
51 del swig_import_helper
52 else:
53 import _lldb
54 del version_info
55 try:
56 _swig_property = property
57 except NameError:
58 pass
60 if (name == "thisown"): return self.this.own(value)
61 if (name == "this"):
62 if type(value).__name__ == 'SwigPyObject':
63 self.__dict__[name] = value
64 return
65 method = class_type.__swig_setmethods__.get(name,None)
66 if method: return method(self,value)
67 if (not static):
68 self.__dict__[name] = value
69 else:
70 raise AttributeError("You cannot add attributes to %s" % self)
71
74
76 if (name == "thisown"): return self.this.own()
77 method = class_type.__swig_getmethods__.get(name,None)
78 if method: return method(self)
79 raise AttributeError(name)
80
82 try: strthis = "proxy of " + self.this.__repr__()
83 except: strthis = ""
84 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
85
86 try:
87 _object = object
88 _newclass = 1
89 except AttributeError:
91 _newclass = 0
92
93
94 import uuid
95 import re
96 import os
97
98 UINT32_MAX = _lldb.UINT32_MAX
99 UINT64_MAX = _lldb.UINT64_MAX
100 LLDB_GENERIC_ERROR = _lldb.LLDB_GENERIC_ERROR
101 LLDB_INVALID_BREAK_ID = _lldb.LLDB_INVALID_BREAK_ID
102 LLDB_DEFAULT_BREAK_SIZE = _lldb.LLDB_DEFAULT_BREAK_SIZE
103 LLDB_INVALID_WATCH_ID = _lldb.LLDB_INVALID_WATCH_ID
104 LLDB_WATCH_TYPE_READ = _lldb.LLDB_WATCH_TYPE_READ
105 LLDB_WATCH_TYPE_WRITE = _lldb.LLDB_WATCH_TYPE_WRITE
106 LLDB_REGNUM_GENERIC_PC = _lldb.LLDB_REGNUM_GENERIC_PC
107 LLDB_REGNUM_GENERIC_SP = _lldb.LLDB_REGNUM_GENERIC_SP
108 LLDB_REGNUM_GENERIC_FP = _lldb.LLDB_REGNUM_GENERIC_FP
109 LLDB_REGNUM_GENERIC_RA = _lldb.LLDB_REGNUM_GENERIC_RA
110 LLDB_REGNUM_GENERIC_FLAGS = _lldb.LLDB_REGNUM_GENERIC_FLAGS
111 LLDB_REGNUM_GENERIC_ARG1 = _lldb.LLDB_REGNUM_GENERIC_ARG1
112 LLDB_REGNUM_GENERIC_ARG2 = _lldb.LLDB_REGNUM_GENERIC_ARG2
113 LLDB_REGNUM_GENERIC_ARG3 = _lldb.LLDB_REGNUM_GENERIC_ARG3
114 LLDB_REGNUM_GENERIC_ARG4 = _lldb.LLDB_REGNUM_GENERIC_ARG4
115 LLDB_REGNUM_GENERIC_ARG5 = _lldb.LLDB_REGNUM_GENERIC_ARG5
116 LLDB_REGNUM_GENERIC_ARG6 = _lldb.LLDB_REGNUM_GENERIC_ARG6
117 LLDB_REGNUM_GENERIC_ARG7 = _lldb.LLDB_REGNUM_GENERIC_ARG7
118 LLDB_REGNUM_GENERIC_ARG8 = _lldb.LLDB_REGNUM_GENERIC_ARG8
119 LLDB_INVALID_ADDRESS = _lldb.LLDB_INVALID_ADDRESS
120 LLDB_INVALID_INDEX32 = _lldb.LLDB_INVALID_INDEX32
121 LLDB_INVALID_IVAR_OFFSET = _lldb.LLDB_INVALID_IVAR_OFFSET
122 LLDB_INVALID_IMAGE_TOKEN = _lldb.LLDB_INVALID_IMAGE_TOKEN
123 LLDB_INVALID_REGNUM = _lldb.LLDB_INVALID_REGNUM
124 LLDB_INVALID_UID = _lldb.LLDB_INVALID_UID
125 LLDB_INVALID_PROCESS_ID = _lldb.LLDB_INVALID_PROCESS_ID
126 LLDB_INVALID_THREAD_ID = _lldb.LLDB_INVALID_THREAD_ID
127 LLDB_INVALID_FRAME_ID = _lldb.LLDB_INVALID_FRAME_ID
128 LLDB_INVALID_OFFSET = _lldb.LLDB_INVALID_OFFSET
129 LLDB_ARCH_DEFAULT = _lldb.LLDB_ARCH_DEFAULT
130 LLDB_ARCH_DEFAULT_32BIT = _lldb.LLDB_ARCH_DEFAULT_32BIT
131 LLDB_ARCH_DEFAULT_64BIT = _lldb.LLDB_ARCH_DEFAULT_64BIT
132 LLDB_INVALID_CPUTYPE = _lldb.LLDB_INVALID_CPUTYPE
133 LLDB_MAX_NUM_OPTION_SETS = _lldb.LLDB_MAX_NUM_OPTION_SETS
134 LLDB_OPT_SET_ALL = _lldb.LLDB_OPT_SET_ALL
135 LLDB_OPT_SET_1 = _lldb.LLDB_OPT_SET_1
136 LLDB_OPT_SET_2 = _lldb.LLDB_OPT_SET_2
137 LLDB_OPT_SET_3 = _lldb.LLDB_OPT_SET_3
138 LLDB_OPT_SET_4 = _lldb.LLDB_OPT_SET_4
139 LLDB_OPT_SET_5 = _lldb.LLDB_OPT_SET_5
140 LLDB_OPT_SET_6 = _lldb.LLDB_OPT_SET_6
141 LLDB_OPT_SET_7 = _lldb.LLDB_OPT_SET_7
142 LLDB_OPT_SET_8 = _lldb.LLDB_OPT_SET_8
143 LLDB_OPT_SET_9 = _lldb.LLDB_OPT_SET_9
144 LLDB_OPT_SET_10 = _lldb.LLDB_OPT_SET_10
145 eStateInvalid = _lldb.eStateInvalid
146 eStateUnloaded = _lldb.eStateUnloaded
147 eStateConnected = _lldb.eStateConnected
148 eStateAttaching = _lldb.eStateAttaching
149 eStateLaunching = _lldb.eStateLaunching
150 eStateStopped = _lldb.eStateStopped
151 eStateRunning = _lldb.eStateRunning
152 eStateStepping = _lldb.eStateStepping
153 eStateCrashed = _lldb.eStateCrashed
154 eStateDetached = _lldb.eStateDetached
155 eStateExited = _lldb.eStateExited
156 eStateSuspended = _lldb.eStateSuspended
157 eLaunchFlagNone = _lldb.eLaunchFlagNone
158 eLaunchFlagExec = _lldb.eLaunchFlagExec
159 eLaunchFlagDebug = _lldb.eLaunchFlagDebug
160 eLaunchFlagStopAtEntry = _lldb.eLaunchFlagStopAtEntry
161 eLaunchFlagDisableASLR = _lldb.eLaunchFlagDisableASLR
162 eLaunchFlagDisableSTDIO = _lldb.eLaunchFlagDisableSTDIO
163 eLaunchFlagLaunchInTTY = _lldb.eLaunchFlagLaunchInTTY
164 eLaunchFlagLaunchInShell = _lldb.eLaunchFlagLaunchInShell
165 eLaunchFlagLaunchInSeparateProcessGroup = _lldb.eLaunchFlagLaunchInSeparateProcessGroup
166 eOnlyThisThread = _lldb.eOnlyThisThread
167 eAllThreads = _lldb.eAllThreads
168 eOnlyDuringStepping = _lldb.eOnlyDuringStepping
169 eByteOrderInvalid = _lldb.eByteOrderInvalid
170 eByteOrderBig = _lldb.eByteOrderBig
171 eByteOrderPDP = _lldb.eByteOrderPDP
172 eByteOrderLittle = _lldb.eByteOrderLittle
173 eEncodingInvalid = _lldb.eEncodingInvalid
174 eEncodingUint = _lldb.eEncodingUint
175 eEncodingSint = _lldb.eEncodingSint
176 eEncodingIEEE754 = _lldb.eEncodingIEEE754
177 eEncodingVector = _lldb.eEncodingVector
178 eFormatDefault = _lldb.eFormatDefault
179 eFormatInvalid = _lldb.eFormatInvalid
180 eFormatBoolean = _lldb.eFormatBoolean
181 eFormatBinary = _lldb.eFormatBinary
182 eFormatBytes = _lldb.eFormatBytes
183 eFormatBytesWithASCII = _lldb.eFormatBytesWithASCII
184 eFormatChar = _lldb.eFormatChar
185 eFormatCharPrintable = _lldb.eFormatCharPrintable
186 eFormatComplex = _lldb.eFormatComplex
187 eFormatComplexFloat = _lldb.eFormatComplexFloat
188 eFormatCString = _lldb.eFormatCString
189 eFormatDecimal = _lldb.eFormatDecimal
190 eFormatEnum = _lldb.eFormatEnum
191 eFormatHex = _lldb.eFormatHex
192 eFormatHexUppercase = _lldb.eFormatHexUppercase
193 eFormatFloat = _lldb.eFormatFloat
194 eFormatOctal = _lldb.eFormatOctal
195 eFormatOSType = _lldb.eFormatOSType
196 eFormatUnicode16 = _lldb.eFormatUnicode16
197 eFormatUnicode32 = _lldb.eFormatUnicode32
198 eFormatUnsigned = _lldb.eFormatUnsigned
199 eFormatPointer = _lldb.eFormatPointer
200 eFormatVectorOfChar = _lldb.eFormatVectorOfChar
201 eFormatVectorOfSInt8 = _lldb.eFormatVectorOfSInt8
202 eFormatVectorOfUInt8 = _lldb.eFormatVectorOfUInt8
203 eFormatVectorOfSInt16 = _lldb.eFormatVectorOfSInt16
204 eFormatVectorOfUInt16 = _lldb.eFormatVectorOfUInt16
205 eFormatVectorOfSInt32 = _lldb.eFormatVectorOfSInt32
206 eFormatVectorOfUInt32 = _lldb.eFormatVectorOfUInt32
207 eFormatVectorOfSInt64 = _lldb.eFormatVectorOfSInt64
208 eFormatVectorOfUInt64 = _lldb.eFormatVectorOfUInt64
209 eFormatVectorOfFloat32 = _lldb.eFormatVectorOfFloat32
210 eFormatVectorOfFloat64 = _lldb.eFormatVectorOfFloat64
211 eFormatVectorOfUInt128 = _lldb.eFormatVectorOfUInt128
212 eFormatComplexInteger = _lldb.eFormatComplexInteger
213 eFormatCharArray = _lldb.eFormatCharArray
214 eFormatAddressInfo = _lldb.eFormatAddressInfo
215 eFormatHexFloat = _lldb.eFormatHexFloat
216 eFormatInstruction = _lldb.eFormatInstruction
217 eFormatVoid = _lldb.eFormatVoid
218 kNumFormats = _lldb.kNumFormats
219 eDescriptionLevelBrief = _lldb.eDescriptionLevelBrief
220 eDescriptionLevelFull = _lldb.eDescriptionLevelFull
221 eDescriptionLevelVerbose = _lldb.eDescriptionLevelVerbose
222 eDescriptionLevelInitial = _lldb.eDescriptionLevelInitial
223 kNumDescriptionLevels = _lldb.kNumDescriptionLevels
224 eScriptLanguageNone = _lldb.eScriptLanguageNone
225 eScriptLanguagePython = _lldb.eScriptLanguagePython
226 eScriptLanguageDefault = _lldb.eScriptLanguageDefault
227 eRegisterKindGCC = _lldb.eRegisterKindGCC
228 eRegisterKindDWARF = _lldb.eRegisterKindDWARF
229 eRegisterKindGeneric = _lldb.eRegisterKindGeneric
230 eRegisterKindGDB = _lldb.eRegisterKindGDB
231 eRegisterKindLLDB = _lldb.eRegisterKindLLDB
232 kNumRegisterKinds = _lldb.kNumRegisterKinds
233 eStopReasonInvalid = _lldb.eStopReasonInvalid
234 eStopReasonNone = _lldb.eStopReasonNone
235 eStopReasonTrace = _lldb.eStopReasonTrace
236 eStopReasonBreakpoint = _lldb.eStopReasonBreakpoint
237 eStopReasonWatchpoint = _lldb.eStopReasonWatchpoint
238 eStopReasonSignal = _lldb.eStopReasonSignal
239 eStopReasonException = _lldb.eStopReasonException
240 eStopReasonExec = _lldb.eStopReasonExec
241 eStopReasonPlanComplete = _lldb.eStopReasonPlanComplete
242 eStopReasonThreadExiting = _lldb.eStopReasonThreadExiting
243 eReturnStatusInvalid = _lldb.eReturnStatusInvalid
244 eReturnStatusSuccessFinishNoResult = _lldb.eReturnStatusSuccessFinishNoResult
245 eReturnStatusSuccessFinishResult = _lldb.eReturnStatusSuccessFinishResult
246 eReturnStatusSuccessContinuingNoResult = _lldb.eReturnStatusSuccessContinuingNoResult
247 eReturnStatusSuccessContinuingResult = _lldb.eReturnStatusSuccessContinuingResult
248 eReturnStatusStarted = _lldb.eReturnStatusStarted
249 eReturnStatusFailed = _lldb.eReturnStatusFailed
250 eReturnStatusQuit = _lldb.eReturnStatusQuit
251 eConnectionStatusSuccess = _lldb.eConnectionStatusSuccess
252 eConnectionStatusEndOfFile = _lldb.eConnectionStatusEndOfFile
253 eConnectionStatusError = _lldb.eConnectionStatusError
254 eConnectionStatusTimedOut = _lldb.eConnectionStatusTimedOut
255 eConnectionStatusNoConnection = _lldb.eConnectionStatusNoConnection
256 eConnectionStatusLostConnection = _lldb.eConnectionStatusLostConnection
257 eErrorTypeInvalid = _lldb.eErrorTypeInvalid
258 eErrorTypeGeneric = _lldb.eErrorTypeGeneric
259 eErrorTypeMachKernel = _lldb.eErrorTypeMachKernel
260 eErrorTypePOSIX = _lldb.eErrorTypePOSIX
261 eValueTypeInvalid = _lldb.eValueTypeInvalid
262 eValueTypeVariableGlobal = _lldb.eValueTypeVariableGlobal
263 eValueTypeVariableStatic = _lldb.eValueTypeVariableStatic
264 eValueTypeVariableArgument = _lldb.eValueTypeVariableArgument
265 eValueTypeVariableLocal = _lldb.eValueTypeVariableLocal
266 eValueTypeRegister = _lldb.eValueTypeRegister
267 eValueTypeRegisterSet = _lldb.eValueTypeRegisterSet
268 eValueTypeConstResult = _lldb.eValueTypeConstResult
269 eInputReaderGranularityInvalid = _lldb.eInputReaderGranularityInvalid
270 eInputReaderGranularityByte = _lldb.eInputReaderGranularityByte
271 eInputReaderGranularityWord = _lldb.eInputReaderGranularityWord
272 eInputReaderGranularityLine = _lldb.eInputReaderGranularityLine
273 eInputReaderGranularityAll = _lldb.eInputReaderGranularityAll
274 eSymbolContextTarget = _lldb.eSymbolContextTarget
275 eSymbolContextModule = _lldb.eSymbolContextModule
276 eSymbolContextCompUnit = _lldb.eSymbolContextCompUnit
277 eSymbolContextFunction = _lldb.eSymbolContextFunction
278 eSymbolContextBlock = _lldb.eSymbolContextBlock
279 eSymbolContextLineEntry = _lldb.eSymbolContextLineEntry
280 eSymbolContextSymbol = _lldb.eSymbolContextSymbol
281 eSymbolContextEverything = _lldb.eSymbolContextEverything
282 ePermissionsWritable = _lldb.ePermissionsWritable
283 ePermissionsReadable = _lldb.ePermissionsReadable
284 ePermissionsExecutable = _lldb.ePermissionsExecutable
285 eInputReaderActivate = _lldb.eInputReaderActivate
286 eInputReaderAsynchronousOutputWritten = _lldb.eInputReaderAsynchronousOutputWritten
287 eInputReaderReactivate = _lldb.eInputReaderReactivate
288 eInputReaderDeactivate = _lldb.eInputReaderDeactivate
289 eInputReaderGotToken = _lldb.eInputReaderGotToken
290 eInputReaderInterrupt = _lldb.eInputReaderInterrupt
291 eInputReaderEndOfFile = _lldb.eInputReaderEndOfFile
292 eInputReaderDone = _lldb.eInputReaderDone
293 eBreakpointEventTypeInvalidType = _lldb.eBreakpointEventTypeInvalidType
294 eBreakpointEventTypeAdded = _lldb.eBreakpointEventTypeAdded
295 eBreakpointEventTypeRemoved = _lldb.eBreakpointEventTypeRemoved
296 eBreakpointEventTypeLocationsAdded = _lldb.eBreakpointEventTypeLocationsAdded
297 eBreakpointEventTypeLocationsRemoved = _lldb.eBreakpointEventTypeLocationsRemoved
298 eBreakpointEventTypeLocationsResolved = _lldb.eBreakpointEventTypeLocationsResolved
299 eBreakpointEventTypeEnabled = _lldb.eBreakpointEventTypeEnabled
300 eBreakpointEventTypeDisabled = _lldb.eBreakpointEventTypeDisabled
301 eBreakpointEventTypeCommandChanged = _lldb.eBreakpointEventTypeCommandChanged
302 eBreakpointEventTypeConditionChanged = _lldb.eBreakpointEventTypeConditionChanged
303 eBreakpointEventTypeIgnoreChanged = _lldb.eBreakpointEventTypeIgnoreChanged
304 eBreakpointEventTypeThreadChanged = _lldb.eBreakpointEventTypeThreadChanged
305 eWatchpointEventTypeInvalidType = _lldb.eWatchpointEventTypeInvalidType
306 eWatchpointEventTypeAdded = _lldb.eWatchpointEventTypeAdded
307 eWatchpointEventTypeRemoved = _lldb.eWatchpointEventTypeRemoved
308 eWatchpointEventTypeEnabled = _lldb.eWatchpointEventTypeEnabled
309 eWatchpointEventTypeDisabled = _lldb.eWatchpointEventTypeDisabled
310 eWatchpointEventTypeCommandChanged = _lldb.eWatchpointEventTypeCommandChanged
311 eWatchpointEventTypeConditionChanged = _lldb.eWatchpointEventTypeConditionChanged
312 eWatchpointEventTypeIgnoreChanged = _lldb.eWatchpointEventTypeIgnoreChanged
313 eWatchpointEventTypeThreadChanged = _lldb.eWatchpointEventTypeThreadChanged
314 eWatchpointEventTypeTypeChanged = _lldb.eWatchpointEventTypeTypeChanged
315 eLanguageTypeUnknown = _lldb.eLanguageTypeUnknown
316 eLanguageTypeC89 = _lldb.eLanguageTypeC89
317 eLanguageTypeC = _lldb.eLanguageTypeC
318 eLanguageTypeAda83 = _lldb.eLanguageTypeAda83
319 eLanguageTypeC_plus_plus = _lldb.eLanguageTypeC_plus_plus
320 eLanguageTypeCobol74 = _lldb.eLanguageTypeCobol74
321 eLanguageTypeCobol85 = _lldb.eLanguageTypeCobol85
322 eLanguageTypeFortran77 = _lldb.eLanguageTypeFortran77
323 eLanguageTypeFortran90 = _lldb.eLanguageTypeFortran90
324 eLanguageTypePascal83 = _lldb.eLanguageTypePascal83
325 eLanguageTypeModula2 = _lldb.eLanguageTypeModula2
326 eLanguageTypeJava = _lldb.eLanguageTypeJava
327 eLanguageTypeC99 = _lldb.eLanguageTypeC99
328 eLanguageTypeAda95 = _lldb.eLanguageTypeAda95
329 eLanguageTypeFortran95 = _lldb.eLanguageTypeFortran95
330 eLanguageTypePLI = _lldb.eLanguageTypePLI
331 eLanguageTypeObjC = _lldb.eLanguageTypeObjC
332 eLanguageTypeObjC_plus_plus = _lldb.eLanguageTypeObjC_plus_plus
333 eLanguageTypeUPC = _lldb.eLanguageTypeUPC
334 eLanguageTypeD = _lldb.eLanguageTypeD
335 eLanguageTypePython = _lldb.eLanguageTypePython
336 eNumLanguageTypes = _lldb.eNumLanguageTypes
337 eNoDynamicValues = _lldb.eNoDynamicValues
338 eDynamicCanRunTarget = _lldb.eDynamicCanRunTarget
339 eDynamicDontRunTarget = _lldb.eDynamicDontRunTarget
340 eAccessNone = _lldb.eAccessNone
341 eAccessPublic = _lldb.eAccessPublic
342 eAccessPrivate = _lldb.eAccessPrivate
343 eAccessProtected = _lldb.eAccessProtected
344 eAccessPackage = _lldb.eAccessPackage
345 eArgTypeAddress = _lldb.eArgTypeAddress
346 eArgTypeAddressOrExpression = _lldb.eArgTypeAddressOrExpression
347 eArgTypeAliasName = _lldb.eArgTypeAliasName
348 eArgTypeAliasOptions = _lldb.eArgTypeAliasOptions
349 eArgTypeArchitecture = _lldb.eArgTypeArchitecture
350 eArgTypeBoolean = _lldb.eArgTypeBoolean
351 eArgTypeBreakpointID = _lldb.eArgTypeBreakpointID
352 eArgTypeBreakpointIDRange = _lldb.eArgTypeBreakpointIDRange
353 eArgTypeByteSize = _lldb.eArgTypeByteSize
354 eArgTypeClassName = _lldb.eArgTypeClassName
355 eArgTypeCommandName = _lldb.eArgTypeCommandName
356 eArgTypeCount = _lldb.eArgTypeCount
357 eArgTypeDirectoryName = _lldb.eArgTypeDirectoryName
358 eArgTypeDisassemblyFlavor = _lldb.eArgTypeDisassemblyFlavor
359 eArgTypeEndAddress = _lldb.eArgTypeEndAddress
360 eArgTypeExpression = _lldb.eArgTypeExpression
361 eArgTypeExpressionPath = _lldb.eArgTypeExpressionPath
362 eArgTypeExprFormat = _lldb.eArgTypeExprFormat
363 eArgTypeFilename = _lldb.eArgTypeFilename
364 eArgTypeFormat = _lldb.eArgTypeFormat
365 eArgTypeFrameIndex = _lldb.eArgTypeFrameIndex
366 eArgTypeFullName = _lldb.eArgTypeFullName
367 eArgTypeFunctionName = _lldb.eArgTypeFunctionName
368 eArgTypeFunctionOrSymbol = _lldb.eArgTypeFunctionOrSymbol
369 eArgTypeGDBFormat = _lldb.eArgTypeGDBFormat
370 eArgTypeIndex = _lldb.eArgTypeIndex
371 eArgTypeLanguage = _lldb.eArgTypeLanguage
372 eArgTypeLineNum = _lldb.eArgTypeLineNum
373 eArgTypeLogCategory = _lldb.eArgTypeLogCategory
374 eArgTypeLogChannel = _lldb.eArgTypeLogChannel
375 eArgTypeMethod = _lldb.eArgTypeMethod
376 eArgTypeName = _lldb.eArgTypeName
377 eArgTypeNewPathPrefix = _lldb.eArgTypeNewPathPrefix
378 eArgTypeNumLines = _lldb.eArgTypeNumLines
379 eArgTypeNumberPerLine = _lldb.eArgTypeNumberPerLine
380 eArgTypeOffset = _lldb.eArgTypeOffset
381 eArgTypeOldPathPrefix = _lldb.eArgTypeOldPathPrefix
382 eArgTypeOneLiner = _lldb.eArgTypeOneLiner
383 eArgTypePid = _lldb.eArgTypePid
384 eArgTypePlugin = _lldb.eArgTypePlugin
385 eArgTypeProcessName = _lldb.eArgTypeProcessName
386 eArgTypePythonClass = _lldb.eArgTypePythonClass
387 eArgTypePythonFunction = _lldb.eArgTypePythonFunction
388 eArgTypePythonScript = _lldb.eArgTypePythonScript
389 eArgTypeQueueName = _lldb.eArgTypeQueueName
390 eArgTypeRegisterName = _lldb.eArgTypeRegisterName
391 eArgTypeRegularExpression = _lldb.eArgTypeRegularExpression
392 eArgTypeRunArgs = _lldb.eArgTypeRunArgs
393 eArgTypeRunMode = _lldb.eArgTypeRunMode
394 eArgTypeScriptedCommandSynchronicity = _lldb.eArgTypeScriptedCommandSynchronicity
395 eArgTypeScriptLang = _lldb.eArgTypeScriptLang
396 eArgTypeSearchWord = _lldb.eArgTypeSearchWord
397 eArgTypeSelector = _lldb.eArgTypeSelector
398 eArgTypeSettingIndex = _lldb.eArgTypeSettingIndex
399 eArgTypeSettingKey = _lldb.eArgTypeSettingKey
400 eArgTypeSettingPrefix = _lldb.eArgTypeSettingPrefix
401 eArgTypeSettingVariableName = _lldb.eArgTypeSettingVariableName
402 eArgTypeShlibName = _lldb.eArgTypeShlibName
403 eArgTypeSourceFile = _lldb.eArgTypeSourceFile
404 eArgTypeSortOrder = _lldb.eArgTypeSortOrder
405 eArgTypeStartAddress = _lldb.eArgTypeStartAddress
406 eArgTypeSummaryString = _lldb.eArgTypeSummaryString
407 eArgTypeSymbol = _lldb.eArgTypeSymbol
408 eArgTypeThreadID = _lldb.eArgTypeThreadID
409 eArgTypeThreadIndex = _lldb.eArgTypeThreadIndex
410 eArgTypeThreadName = _lldb.eArgTypeThreadName
411 eArgTypeUnsignedInteger = _lldb.eArgTypeUnsignedInteger
412 eArgTypeUnixSignal = _lldb.eArgTypeUnixSignal
413 eArgTypeVarName = _lldb.eArgTypeVarName
414 eArgTypeValue = _lldb.eArgTypeValue
415 eArgTypeWidth = _lldb.eArgTypeWidth
416 eArgTypeNone = _lldb.eArgTypeNone
417 eArgTypePlatform = _lldb.eArgTypePlatform
418 eArgTypeWatchpointID = _lldb.eArgTypeWatchpointID
419 eArgTypeWatchpointIDRange = _lldb.eArgTypeWatchpointIDRange
420 eArgTypeWatchType = _lldb.eArgTypeWatchType
421 eArgTypeLastArg = _lldb.eArgTypeLastArg
422 eSymbolTypeAny = _lldb.eSymbolTypeAny
423 eSymbolTypeInvalid = _lldb.eSymbolTypeInvalid
424 eSymbolTypeAbsolute = _lldb.eSymbolTypeAbsolute
425 eSymbolTypeCode = _lldb.eSymbolTypeCode
426 eSymbolTypeResolver = _lldb.eSymbolTypeResolver
427 eSymbolTypeData = _lldb.eSymbolTypeData
428 eSymbolTypeTrampoline = _lldb.eSymbolTypeTrampoline
429 eSymbolTypeRuntime = _lldb.eSymbolTypeRuntime
430 eSymbolTypeException = _lldb.eSymbolTypeException
431 eSymbolTypeSourceFile = _lldb.eSymbolTypeSourceFile
432 eSymbolTypeHeaderFile = _lldb.eSymbolTypeHeaderFile
433 eSymbolTypeObjectFile = _lldb.eSymbolTypeObjectFile
434 eSymbolTypeCommonBlock = _lldb.eSymbolTypeCommonBlock
435 eSymbolTypeBlock = _lldb.eSymbolTypeBlock
436 eSymbolTypeLocal = _lldb.eSymbolTypeLocal
437 eSymbolTypeParam = _lldb.eSymbolTypeParam
438 eSymbolTypeVariable = _lldb.eSymbolTypeVariable
439 eSymbolTypeVariableType = _lldb.eSymbolTypeVariableType
440 eSymbolTypeLineEntry = _lldb.eSymbolTypeLineEntry
441 eSymbolTypeLineHeader = _lldb.eSymbolTypeLineHeader
442 eSymbolTypeScopeBegin = _lldb.eSymbolTypeScopeBegin
443 eSymbolTypeScopeEnd = _lldb.eSymbolTypeScopeEnd
444 eSymbolTypeAdditional = _lldb.eSymbolTypeAdditional
445 eSymbolTypeCompiler = _lldb.eSymbolTypeCompiler
446 eSymbolTypeInstrumentation = _lldb.eSymbolTypeInstrumentation
447 eSymbolTypeUndefined = _lldb.eSymbolTypeUndefined
448 eSymbolTypeObjCClass = _lldb.eSymbolTypeObjCClass
449 eSymbolTypeObjCMetaClass = _lldb.eSymbolTypeObjCMetaClass
450 eSymbolTypeObjCIVar = _lldb.eSymbolTypeObjCIVar
451 eSectionTypeInvalid = _lldb.eSectionTypeInvalid
452 eSectionTypeCode = _lldb.eSectionTypeCode
453 eSectionTypeContainer = _lldb.eSectionTypeContainer
454 eSectionTypeData = _lldb.eSectionTypeData
455 eSectionTypeDataCString = _lldb.eSectionTypeDataCString
456 eSectionTypeDataCStringPointers = _lldb.eSectionTypeDataCStringPointers
457 eSectionTypeDataSymbolAddress = _lldb.eSectionTypeDataSymbolAddress
458 eSectionTypeData4 = _lldb.eSectionTypeData4
459 eSectionTypeData8 = _lldb.eSectionTypeData8
460 eSectionTypeData16 = _lldb.eSectionTypeData16
461 eSectionTypeDataPointers = _lldb.eSectionTypeDataPointers
462 eSectionTypeDebug = _lldb.eSectionTypeDebug
463 eSectionTypeZeroFill = _lldb.eSectionTypeZeroFill
464 eSectionTypeDataObjCMessageRefs = _lldb.eSectionTypeDataObjCMessageRefs
465 eSectionTypeDataObjCCFStrings = _lldb.eSectionTypeDataObjCCFStrings
466 eSectionTypeDWARFDebugAbbrev = _lldb.eSectionTypeDWARFDebugAbbrev
467 eSectionTypeDWARFDebugAranges = _lldb.eSectionTypeDWARFDebugAranges
468 eSectionTypeDWARFDebugFrame = _lldb.eSectionTypeDWARFDebugFrame
469 eSectionTypeDWARFDebugInfo = _lldb.eSectionTypeDWARFDebugInfo
470 eSectionTypeDWARFDebugLine = _lldb.eSectionTypeDWARFDebugLine
471 eSectionTypeDWARFDebugLoc = _lldb.eSectionTypeDWARFDebugLoc
472 eSectionTypeDWARFDebugMacInfo = _lldb.eSectionTypeDWARFDebugMacInfo
473 eSectionTypeDWARFDebugPubNames = _lldb.eSectionTypeDWARFDebugPubNames
474 eSectionTypeDWARFDebugPubTypes = _lldb.eSectionTypeDWARFDebugPubTypes
475 eSectionTypeDWARFDebugRanges = _lldb.eSectionTypeDWARFDebugRanges
476 eSectionTypeDWARFDebugStr = _lldb.eSectionTypeDWARFDebugStr
477 eSectionTypeDWARFAppleNames = _lldb.eSectionTypeDWARFAppleNames
478 eSectionTypeDWARFAppleTypes = _lldb.eSectionTypeDWARFAppleTypes
479 eSectionTypeDWARFAppleNamespaces = _lldb.eSectionTypeDWARFAppleNamespaces
480 eSectionTypeDWARFAppleObjC = _lldb.eSectionTypeDWARFAppleObjC
481 eSectionTypeELFSymbolTable = _lldb.eSectionTypeELFSymbolTable
482 eSectionTypeELFDynamicSymbols = _lldb.eSectionTypeELFDynamicSymbols
483 eSectionTypeELFRelocationEntries = _lldb.eSectionTypeELFRelocationEntries
484 eSectionTypeELFDynamicLinkInfo = _lldb.eSectionTypeELFDynamicLinkInfo
485 eSectionTypeEHFrame = _lldb.eSectionTypeEHFrame
486 eSectionTypeOther = _lldb.eSectionTypeOther
487 eEmulateInstructionOptionNone = _lldb.eEmulateInstructionOptionNone
488 eEmulateInstructionOptionAutoAdvancePC = _lldb.eEmulateInstructionOptionAutoAdvancePC
489 eEmulateInstructionOptionIgnoreConditions = _lldb.eEmulateInstructionOptionIgnoreConditions
490 eFunctionNameTypeNone = _lldb.eFunctionNameTypeNone
491 eFunctionNameTypeAuto = _lldb.eFunctionNameTypeAuto
492 eFunctionNameTypeFull = _lldb.eFunctionNameTypeFull
493 eFunctionNameTypeBase = _lldb.eFunctionNameTypeBase
494 eFunctionNameTypeMethod = _lldb.eFunctionNameTypeMethod
495 eFunctionNameTypeSelector = _lldb.eFunctionNameTypeSelector
496 eFunctionNameTypeAny = _lldb.eFunctionNameTypeAny
497 eBasicTypeInvalid = _lldb.eBasicTypeInvalid
498 eBasicTypeVoid = _lldb.eBasicTypeVoid
499 eBasicTypeChar = _lldb.eBasicTypeChar
500 eBasicTypeSignedChar = _lldb.eBasicTypeSignedChar
501 eBasicTypeUnsignedChar = _lldb.eBasicTypeUnsignedChar
502 eBasicTypeWChar = _lldb.eBasicTypeWChar
503 eBasicTypeSignedWChar = _lldb.eBasicTypeSignedWChar
504 eBasicTypeUnsignedWChar = _lldb.eBasicTypeUnsignedWChar
505 eBasicTypeChar16 = _lldb.eBasicTypeChar16
506 eBasicTypeChar32 = _lldb.eBasicTypeChar32
507 eBasicTypeShort = _lldb.eBasicTypeShort
508 eBasicTypeUnsignedShort = _lldb.eBasicTypeUnsignedShort
509 eBasicTypeInt = _lldb.eBasicTypeInt
510 eBasicTypeUnsignedInt = _lldb.eBasicTypeUnsignedInt
511 eBasicTypeLong = _lldb.eBasicTypeLong
512 eBasicTypeUnsignedLong = _lldb.eBasicTypeUnsignedLong
513 eBasicTypeLongLong = _lldb.eBasicTypeLongLong
514 eBasicTypeUnsignedLongLong = _lldb.eBasicTypeUnsignedLongLong
515 eBasicTypeInt128 = _lldb.eBasicTypeInt128
516 eBasicTypeUnsignedInt128 = _lldb.eBasicTypeUnsignedInt128
517 eBasicTypeBool = _lldb.eBasicTypeBool
518 eBasicTypeHalf = _lldb.eBasicTypeHalf
519 eBasicTypeFloat = _lldb.eBasicTypeFloat
520 eBasicTypeDouble = _lldb.eBasicTypeDouble
521 eBasicTypeLongDouble = _lldb.eBasicTypeLongDouble
522 eBasicTypeFloatComplex = _lldb.eBasicTypeFloatComplex
523 eBasicTypeDoubleComplex = _lldb.eBasicTypeDoubleComplex
524 eBasicTypeLongDoubleComplex = _lldb.eBasicTypeLongDoubleComplex
525 eBasicTypeObjCID = _lldb.eBasicTypeObjCID
526 eBasicTypeObjCClass = _lldb.eBasicTypeObjCClass
527 eBasicTypeObjCSel = _lldb.eBasicTypeObjCSel
528 eBasicTypeNullPtr = _lldb.eBasicTypeNullPtr
529 eBasicTypeOther = _lldb.eBasicTypeOther
530 eTypeClassInvalid = _lldb.eTypeClassInvalid
531 eTypeClassArray = _lldb.eTypeClassArray
532 eTypeClassBlockPointer = _lldb.eTypeClassBlockPointer
533 eTypeClassBuiltin = _lldb.eTypeClassBuiltin
534 eTypeClassClass = _lldb.eTypeClassClass
535 eTypeClassComplexFloat = _lldb.eTypeClassComplexFloat
536 eTypeClassComplexInteger = _lldb.eTypeClassComplexInteger
537 eTypeClassEnumeration = _lldb.eTypeClassEnumeration
538 eTypeClassFunction = _lldb.eTypeClassFunction
539 eTypeClassMemberPointer = _lldb.eTypeClassMemberPointer
540 eTypeClassObjCObject = _lldb.eTypeClassObjCObject
541 eTypeClassObjCInterface = _lldb.eTypeClassObjCInterface
542 eTypeClassObjCObjectPointer = _lldb.eTypeClassObjCObjectPointer
543 eTypeClassPointer = _lldb.eTypeClassPointer
544 eTypeClassReference = _lldb.eTypeClassReference
545 eTypeClassStruct = _lldb.eTypeClassStruct
546 eTypeClassTypedef = _lldb.eTypeClassTypedef
547 eTypeClassUnion = _lldb.eTypeClassUnion
548 eTypeClassVector = _lldb.eTypeClassVector
549 eTypeClassOther = _lldb.eTypeClassOther
550 eTypeClassAny = _lldb.eTypeClassAny
551 eTemplateArgumentKindNull = _lldb.eTemplateArgumentKindNull
552 eTemplateArgumentKindType = _lldb.eTemplateArgumentKindType
553 eTemplateArgumentKindDeclaration = _lldb.eTemplateArgumentKindDeclaration
554 eTemplateArgumentKindIntegral = _lldb.eTemplateArgumentKindIntegral
555 eTemplateArgumentKindTemplate = _lldb.eTemplateArgumentKindTemplate
556 eTemplateArgumentKindTemplateExpansion = _lldb.eTemplateArgumentKindTemplateExpansion
557 eTemplateArgumentKindExpression = _lldb.eTemplateArgumentKindExpression
558 eTemplateArgumentKindPack = _lldb.eTemplateArgumentKindPack
559 eTypeOptionNone = _lldb.eTypeOptionNone
560 eTypeOptionCascade = _lldb.eTypeOptionCascade
561 eTypeOptionSkipPointers = _lldb.eTypeOptionSkipPointers
562 eTypeOptionSkipReferences = _lldb.eTypeOptionSkipReferences
563 eTypeOptionHideChildren = _lldb.eTypeOptionHideChildren
564 eTypeOptionHideValue = _lldb.eTypeOptionHideValue
565 eTypeOptionShowOneLiner = _lldb.eTypeOptionShowOneLiner
566 eTypeOptionHideNames = _lldb.eTypeOptionHideNames
567 eFrameCompareInvalid = _lldb.eFrameCompareInvalid
568 eFrameCompareUnknown = _lldb.eFrameCompareUnknown
569 eFrameCompareEqual = _lldb.eFrameCompareEqual
570 eFrameCompareYounger = _lldb.eFrameCompareYounger
571 eFrameCompareOlder = _lldb.eFrameCompareOlder
572 eAddressClassInvalid = _lldb.eAddressClassInvalid
573 eAddressClassUnknown = _lldb.eAddressClassUnknown
574 eAddressClassCode = _lldb.eAddressClassCode
575 eAddressClassCodeAlternateISA = _lldb.eAddressClassCodeAlternateISA
576 eAddressClassData = _lldb.eAddressClassData
577 eAddressClassDebug = _lldb.eAddressClassDebug
578 eAddressClassRuntime = _lldb.eAddressClassRuntime
579
580
581
582
583 -def in_range(symbol, section):
600
601
602
603
604
605 -def lldb_iter(obj, getsize, getelem):
606 """A generator adaptor to support iteration for lldb container objects."""
607 size = getattr(obj, getsize)
608 elem = getattr(obj, getelem)
609 for i in range(size()):
610 yield elem(i)
611
612
613
614
615
616
617
618
619
620
621 -class SBAddress(_object):
622 """
623 A section + offset based address class.
624
625 The SBAddress class allows addresses to be relative to a section
626 that can move during runtime due to images (executables, shared
627 libraries, bundles, frameworks) being loaded at different
628 addresses than the addresses found in the object file that
629 represents them on disk. There are currently two types of addresses
630 for a section:
631 o file addresses
632 o load addresses
633
634 File addresses represents the virtual addresses that are in the 'on
635 disk' object files. These virtual addresses are converted to be
636 relative to unique sections scoped to the object file so that
637 when/if the addresses slide when the images are loaded/unloaded
638 in memory, we can easily track these changes without having to
639 update every object (compile unit ranges, line tables, function
640 address ranges, lexical block and inlined subroutine address
641 ranges, global and static variables) each time an image is loaded or
642 unloaded.
643
644 Load addresses represents the virtual addresses where each section
645 ends up getting loaded at runtime. Before executing a program, it
646 is common for all of the load addresses to be unresolved. When a
647 DynamicLoader plug-in receives notification that shared libraries
648 have been loaded/unloaded, the load addresses of the main executable
649 and any images (shared libraries) will be resolved/unresolved. When
650 this happens, breakpoints that are in one of these sections can be
651 set/cleared.
652
653 See docstring of SBFunction for example usage of SBAddress.
654 """
655 __swig_setmethods__ = {}
656 __setattr__ = lambda self, name, value: _swig_setattr(self, SBAddress, name, value)
657 __swig_getmethods__ = {}
658 __getattr__ = lambda self, name: _swig_getattr(self, SBAddress, name)
659 __repr__ = _swig_repr
663 """
664 __init__(lldb::SBAddress self) -> SBAddress
665 __init__(lldb::SBAddress self, SBAddress rhs) -> SBAddress
666 __init__(lldb::SBAddress self, SBSection section, lldb::addr_t offset) -> SBAddress
667 __init__(lldb::SBAddress self, lldb::addr_t load_addr, SBTarget target) -> SBAddress
668
669 Create an address by resolving a load address using the supplied target.
670 """
671 this = _lldb.new_SBAddress(*args)
672 try: self.this.append(this)
673 except: self.this = this
674 __swig_destroy__ = _lldb.delete_SBAddress
675 __del__ = lambda self : None;
680
684
688
692
696
700
704
708
712
714 """SetAddress(SBAddress self, SBSection section, lldb::addr_t offset)"""
715 return _lldb.SBAddress_SetAddress(self, *args)
716
720
721 - def GetSymbolContext(self, *args):
722 """
723 GetSymbolContext(SBAddress self, uint32_t resolve_scope) -> SBSymbolContext
724
725 GetSymbolContext() and the following can lookup symbol information for a given address.
726 An address might refer to code or data from an existing module, or it
727 might refer to something on the stack or heap. The following functions
728 will only return valid values if the address has been resolved to a code
729 or data address using 'void SBAddress::SetLoadAddress(...)' or
730 'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.
731 """
732 return _lldb.SBAddress_GetSymbolContext(self, *args)
733
735 """
736 GetModule(SBAddress self) -> SBModule
737
738 GetModule() and the following grab individual objects for a given address and
739 are less efficient if you want more than one symbol related objects.
740 Use one of the following when you want multiple debug symbol related
741 objects for an address:
742 lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
743 lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
744 One or more bits from the SymbolContextItem enumerations can be logically
745 OR'ed together to more efficiently retrieve multiple symbol objects.
746 """
747 return _lldb.SBAddress_GetModule(self)
748
752
756
760
764
765 - def GetLineEntry(self):
766 """GetLineEntry(SBAddress self) -> SBLineEntry"""
767 return _lldb.SBAddress_GetLineEntry(self)
768
770 '''Get the load address for a lldb.SBAddress using the current target.'''
771 return self.GetLoadAddress (target)
772
776
783
785 '''Convert the address to an octal string'''
786 return '%o' % int(self)
787
789 '''Convert the address to an hex string'''
790 return '0x%x' % int(self)
791
792 __swig_getmethods__["module"] = GetModule
793 if _newclass: module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.''')
794
795 __swig_getmethods__["compile_unit"] = GetCompileUnit
796 if _newclass: compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.''')
797
798 __swig_getmethods__["line_entry"] = GetLineEntry
799 if _newclass: line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.''')
800
801 __swig_getmethods__["function"] = GetFunction
802 if _newclass: function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.''')
803
804 __swig_getmethods__["block"] = GetBlock
805 if _newclass: block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.''')
806
807 __swig_getmethods__["symbol"] = GetSymbol
808 if _newclass: symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.''')
809
810 __swig_getmethods__["offset"] = GetOffset
811 if _newclass: offset = property(GetOffset, None, doc='''A read only property that returns the section offset in bytes as an integer.''')
812
813 __swig_getmethods__["section"] = GetSection
814 if _newclass: section = property(GetSection, None, doc='''A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.''')
815
816 __swig_getmethods__["file_addr"] = GetFileAddress
817 if _newclass: file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
818
819 __swig_getmethods__["load_addr"] = __get_load_addr_property__
820 __swig_setmethods__["load_addr"] = __set_load_addr_property__
821 if _newclass: load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target.''')
822
823
825 """__str__(SBAddress self) -> PyObject *"""
826 return _lldb.SBAddress___str__(self)
827
828 SBAddress_swigregister = _lldb.SBAddress_swigregister
829 SBAddress_swigregister(SBAddress)
846 __swig_destroy__ = _lldb.delete_SBBlock
847 __del__ = lambda self : None;
849 """
850 IsInlined(SBBlock self) -> bool
851
852 Does this block represent an inlined function?
853 """
854 return _lldb.SBBlock_IsInlined(self)
855
858 """IsValid(SBBlock self) -> bool"""
859 return _lldb.SBBlock_IsValid(self)
860
862 """
863 GetInlinedName(SBBlock self) -> str const *
864
865 Get the function name if this block represents an inlined function;
866 otherwise, return None.
867 """
868 return _lldb.SBBlock_GetInlinedName(self)
869
871 """
872 GetInlinedCallSiteFile(SBBlock self) -> SBFileSpec
873
874 Get the call site file if this block represents an inlined function;
875 otherwise, return an invalid file spec.
876 """
877 return _lldb.SBBlock_GetInlinedCallSiteFile(self)
878
880 """
881 GetInlinedCallSiteLine(SBBlock self) -> uint32_t
882
883 Get the call site line if this block represents an inlined function;
884 otherwise, return 0.
885 """
886 return _lldb.SBBlock_GetInlinedCallSiteLine(self)
887
889 """
890 GetInlinedCallSiteColumn(SBBlock self) -> uint32_t
891
892 Get the call site column if this block represents an inlined function;
893 otherwise, return 0.
894 """
895 return _lldb.SBBlock_GetInlinedCallSiteColumn(self)
896
898 """
899 GetParent(SBBlock self) -> SBBlock
900
901 Get the parent block.
902 """
903 return _lldb.SBBlock_GetParent(self)
904
906 """
907 GetContainingInlinedBlock(SBBlock self) -> SBBlock
908
909 Get the inlined block that is or contains this block.
910 """
911 return _lldb.SBBlock_GetContainingInlinedBlock(self)
912
914 """
915 GetSibling(SBBlock self) -> SBBlock
916
917 Get the sibling block for this block.
918 """
919 return _lldb.SBBlock_GetSibling(self)
920
922 """
923 GetFirstChild(SBBlock self) -> SBBlock
924
925 Get the first child block.
926 """
927 return _lldb.SBBlock_GetFirstChild(self)
928
932
936
940
944
948
950 """
951 GetVariables(SBBlock self, SBFrame frame, bool arguments, bool locals, bool statics, lldb::DynamicValueType use_dynamic) -> SBValueList
952 GetVariables(SBBlock self, SBTarget target, bool arguments, bool locals, bool statics) -> SBValueList
953 """
954 return _lldb.SBBlock_GetVariables(self, *args)
955
960
962 '''A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.'''
964 self.sbblock = sbblock
965
967 if self.sbblock:
968 return int(self.sbblock.GetNumRanges())
969 return 0
970
982
984 '''An accessor function that returns a ranges_access() object which allows lazy block address ranges access.'''
985 return self.ranges_access (self)
986
988 '''An accessor function that returns an array object that contains all ranges in this block object.'''
989 if not hasattr(self, 'ranges_array'):
990 self.ranges_array = []
991 for idx in range(self.num_ranges):
992 self.ranges_array.append ([self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)])
993 return self.ranges_array
994
997
998 __swig_getmethods__["parent"] = GetParent
999 if _newclass: parent = property(GetParent, None, doc='''A read only property that returns the same result as GetParent().''')
1000
1001 __swig_getmethods__["first_child"] = GetFirstChild
1002 if _newclass: first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''')
1003
1004 __swig_getmethods__["call_site"] = get_call_site
1005 if _newclass: call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''')
1006
1007 __swig_getmethods__["sibling"] = GetSibling
1008 if _newclass: sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''')
1009
1010 __swig_getmethods__["name"] = GetInlinedName
1011 if _newclass: name = property(GetInlinedName, None, doc='''A read only property that returns the same result as GetInlinedName().''')
1012
1013 __swig_getmethods__["inlined_block"] = GetContainingInlinedBlock
1014 if _newclass: inlined_block = property(GetContainingInlinedBlock, None, doc='''A read only property that returns the same result as GetContainingInlinedBlock().''')
1015
1016 __swig_getmethods__["range"] = get_ranges_access_object
1017 if _newclass: range = property(get_ranges_access_object, None, doc='''A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").''')
1018
1019 __swig_getmethods__["ranges"] = get_ranges_array
1020 if _newclass: ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
1021
1022 __swig_getmethods__["num_ranges"] = GetNumRanges
1023 if _newclass: num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
1024
1026 """__str__(SBBlock self) -> PyObject *"""
1027 return _lldb.SBBlock___str__(self)
1028
1029 SBBlock_swigregister = _lldb.SBBlock_swigregister
1030 SBBlock_swigregister(SBBlock)
1033 """
1034 Represents a logical breakpoint and its associated settings.
1035
1036 For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
1037 TestBreakpointIgnoreCount.py),
1038
1039 def breakpoint_ignore_count_python(self):
1040 '''Use Python APIs to set breakpoint ignore count.'''
1041 exe = os.path.join(os.getcwd(), 'a.out')
1042
1043 # Create a target by the debugger.
1044 target = self.dbg.CreateTarget(exe)
1045 self.assertTrue(target, VALID_TARGET)
1046
1047 # Now create a breakpoint on main.c by name 'c'.
1048 breakpoint = target.BreakpointCreateByName('c', 'a.out')
1049 self.assertTrue(breakpoint and
1050 breakpoint.GetNumLocations() == 1,
1051 VALID_BREAKPOINT)
1052
1053 # Get the breakpoint location from breakpoint after we verified that,
1054 # indeed, it has one location.
1055 location = breakpoint.GetLocationAtIndex(0)
1056 self.assertTrue(location and
1057 location.IsEnabled(),
1058 VALID_BREAKPOINT_LOCATION)
1059
1060 # Set the ignore count on the breakpoint location.
1061 location.SetIgnoreCount(2)
1062 self.assertTrue(location.GetIgnoreCount() == 2,
1063 'SetIgnoreCount() works correctly')
1064
1065 # Now launch the process, and do not stop at entry point.
1066 process = target.LaunchSimple(None, None, os.getcwd())
1067 self.assertTrue(process, PROCESS_IS_VALID)
1068
1069 # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and
1070 # frame#2 should be on main.c:48.
1071 #lldbutil.print_stacktraces(process)
1072 from lldbutil import get_stopped_thread
1073 thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
1074 self.assertTrue(thread != None, 'There should be a thread stopped due to breakpoint')
1075 frame0 = thread.GetFrameAtIndex(0)
1076 frame1 = thread.GetFrameAtIndex(1)
1077 frame2 = thread.GetFrameAtIndex(2)
1078 self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
1079 frame1.GetLineEntry().GetLine() == self.line3 and
1080 frame2.GetLineEntry().GetLine() == self.line4,
1081 STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT)
1082
1083 # The hit count for the breakpoint should be 3.
1084 self.assertTrue(breakpoint.GetHitCount() == 3)
1085
1086 process.Continue()
1087
1088 SBBreakpoint supports breakpoint location iteration, for example,
1089
1090 for bl in breakpoint:
1091 print 'breakpoint location load addr: %s' % hex(bl.GetLoadAddress())
1092 print 'breakpoint location condition: %s' % hex(bl.GetCondition())
1093
1094 and rich comparion methods which allow the API program to use,
1095
1096 if aBreakpoint == bBreakpoint:
1097 ...
1098
1099 to compare two breakpoints for equality.
1100 """
1101 __swig_setmethods__ = {}
1102 __setattr__ = lambda self, name, value: _swig_setattr(self, SBBreakpoint, name, value)
1103 __swig_getmethods__ = {}
1104 __getattr__ = lambda self, name: _swig_getattr(self, SBBreakpoint, name)
1105 __repr__ = _swig_repr
1106 - def __iter__(self): return lldb_iter(self, 'GetNumLocations', 'GetLocationAtIndex')
1111 """
1112 __init__(lldb::SBBreakpoint self) -> SBBreakpoint
1113 __init__(lldb::SBBreakpoint self, SBBreakpoint rhs) -> SBBreakpoint
1114 """
1115 this = _lldb.new_SBBreakpoint(*args)
1116 try: self.this.append(this)
1117 except: self.this = this
1118 __swig_destroy__ = _lldb.delete_SBBreakpoint
1119 __del__ = lambda self : None;
1121 """GetID(SBBreakpoint self) -> lldb::break_id_t"""
1122 return _lldb.SBBreakpoint_GetID(self)
1123
1128
1132
1136
1140
1144
1148
1152
1156
1160
1164
1168
1172
1176
1180
1182 """
1183 SetCondition(SBBreakpoint self, str const * condition)
1184
1185 The breakpoint stops only if the condition expression evaluates to true.
1186 """
1187 return _lldb.SBBreakpoint_SetCondition(self, *args)
1188
1190 """
1191 GetCondition(SBBreakpoint self) -> str const *
1192
1193 Get the condition expression for the breakpoint.
1194 """
1195 return _lldb.SBBreakpoint_GetCondition(self)
1196
1200
1204
1208
1212
1216
1220
1224
1228
1230 """SetCallback(SBBreakpoint self, lldb::SBBreakpoint::BreakpointHitCallback callback, void * baton)"""
1231 return _lldb.SBBreakpoint_SetCallback(self, *args)
1232
1236
1240
1244
1248
1252
1256
1257 if _newclass:EventIsBreakpointEvent = staticmethod(EventIsBreakpointEvent)
1258 __swig_getmethods__["EventIsBreakpointEvent"] = lambda x: EventIsBreakpointEvent
1262
1263 if _newclass:GetBreakpointEventTypeFromEvent = staticmethod(GetBreakpointEventTypeFromEvent)
1264 __swig_getmethods__["GetBreakpointEventTypeFromEvent"] = lambda x: GetBreakpointEventTypeFromEvent
1268
1269 if _newclass:GetBreakpointFromEvent = staticmethod(GetBreakpointFromEvent)
1270 __swig_getmethods__["GetBreakpointFromEvent"] = lambda x: GetBreakpointFromEvent
1274
1275 if _newclass:GetBreakpointLocationAtIndexFromEvent = staticmethod(GetBreakpointLocationAtIndexFromEvent)
1276 __swig_getmethods__["GetBreakpointLocationAtIndexFromEvent"] = lambda x: GetBreakpointLocationAtIndexFromEvent
1280
1281 if _newclass:GetNumBreakpointLocationsFromEvent = staticmethod(GetNumBreakpointLocationsFromEvent)
1282 __swig_getmethods__["GetNumBreakpointLocationsFromEvent"] = lambda x: GetNumBreakpointLocationsFromEvent
1283 __swig_getmethods__["id"] = GetID
1284 if _newclass: id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')
1285
1286 __swig_getmethods__["enabled"] = IsEnabled
1287 __swig_setmethods__["enabled"] = SetEnabled
1288 if _newclass: enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''')
1289
1290 __swig_getmethods__["one_shot"] = IsOneShot
1291 __swig_setmethods__["one_shot"] = SetOneShot
1292 if _newclass: one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
1293
1294 __swig_getmethods__["num_locations"] = GetNumLocations
1295 if _newclass: num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
1296
1297
1301
1303 if not isinstance(rhs, type(self)):
1304 return False
1305
1306 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
1307
1309 if not isinstance(rhs, type(self)):
1310 return True
1311
1312 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
1313
1314 SBBreakpoint_swigregister = _lldb.SBBreakpoint_swigregister
1315 SBBreakpoint_swigregister(SBBreakpoint)
1320
1324
1328
1332
1336
1338 """
1339 Represents one unique instance (by address) of a logical breakpoint.
1340
1341 A breakpoint location is defined by the breakpoint that produces it,
1342 and the address that resulted in this particular instantiation.
1343 Each breakpoint location has its settable options.
1344
1345 SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
1346 for retrieval of an SBBreakpointLocation from an SBBreakpoint.
1347 """
1348 __swig_setmethods__ = {}
1349 __setattr__ = lambda self, name, value: _swig_setattr(self, SBBreakpointLocation, name, value)
1350 __swig_getmethods__ = {}
1351 __getattr__ = lambda self, name: _swig_getattr(self, SBBreakpointLocation, name)
1352 __repr__ = _swig_repr
1354 """
1355 __init__(lldb::SBBreakpointLocation self) -> SBBreakpointLocation
1356 __init__(lldb::SBBreakpointLocation self, SBBreakpointLocation rhs) -> SBBreakpointLocation
1357 """
1358 this = _lldb.new_SBBreakpointLocation(*args)
1359 try: self.this.append(this)
1360 except: self.this = this
1361 __swig_destroy__ = _lldb.delete_SBBreakpointLocation
1362 __del__ = lambda self : None;
1366
1371
1375
1379
1383
1387
1391
1395
1397 """
1398 SetCondition(SBBreakpointLocation self, str const * condition)
1399
1400 The breakpoint location stops only if the condition expression evaluates
1401 to true.
1402 """
1403 return _lldb.SBBreakpointLocation_SetCondition(self, *args)
1404
1406 """
1407 GetCondition(SBBreakpointLocation self) -> str const *
1408
1409 Get the condition expression for the breakpoint location.
1410 """
1411 return _lldb.SBBreakpointLocation_GetCondition(self)
1412
1416
1420
1424
1428
1432
1436
1440
1444
1448
1452
1456
1460
1461 SBBreakpointLocation_swigregister = _lldb.SBBreakpointLocation_swigregister
1462 SBBreakpointLocation_swigregister(SBBreakpointLocation)
1465 """
1466 Represents an entity which can broadcast events. A default broadcaster is
1467 associated with an SBCommandInterpreter, SBProcess, and SBTarget. For
1468 example, use
1469
1470 broadcaster = process.GetBroadcaster()
1471
1472 to retrieve the process's broadcaster.
1473
1474 See also SBEvent for example usage of interacting with a broadcaster.
1475 """
1476 __swig_setmethods__ = {}
1477 __setattr__ = lambda self, name, value: _swig_setattr(self, SBBroadcaster, name, value)
1478 __swig_getmethods__ = {}
1479 __getattr__ = lambda self, name: _swig_getattr(self, SBBroadcaster, name)
1480 __repr__ = _swig_repr
1482 """
1483 __init__(lldb::SBBroadcaster self) -> SBBroadcaster
1484 __init__(lldb::SBBroadcaster self, str const * name) -> SBBroadcaster
1485 __init__(lldb::SBBroadcaster self, SBBroadcaster rhs) -> SBBroadcaster
1486 """
1487 this = _lldb.new_SBBroadcaster(*args)
1488 try: self.this.append(this)
1489 except: self.this = this
1490 __swig_destroy__ = _lldb.delete_SBBroadcaster
1491 __del__ = lambda self : None;
1496
1500
1502 """
1503 BroadcastEventByType(SBBroadcaster self, uint32_t event_type, bool unique=False)
1504 BroadcastEventByType(SBBroadcaster self, uint32_t event_type)
1505 """
1506 return _lldb.SBBroadcaster_BroadcastEventByType(self, *args)
1507
1509 """
1510 BroadcastEvent(SBBroadcaster self, SBEvent event, bool unique=False)
1511 BroadcastEvent(SBBroadcaster self, SBEvent event)
1512 """
1513 return _lldb.SBBroadcaster_BroadcastEvent(self, *args)
1514
1518
1520 """AddListener(SBBroadcaster self, SBListener listener, uint32_t event_mask) -> uint32_t"""
1521 return _lldb.SBBroadcaster_AddListener(self, *args)
1522
1526
1530
1532 """
1533 RemoveListener(SBBroadcaster self, SBListener listener, uint32_t event_mask=4294967295U) -> bool
1534 RemoveListener(SBBroadcaster self, SBListener listener) -> bool
1535 """
1536 return _lldb.SBBroadcaster_RemoveListener(self, *args)
1537
1541
1545
1547 if not isinstance(rhs, type(self)):
1548 return False
1549
1550 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
1551
1553 if not isinstance(rhs, type(self)):
1554 return True
1555
1556 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
1557
1558 SBBroadcaster_swigregister = _lldb.SBBroadcaster_swigregister
1559 SBBroadcaster_swigregister(SBBroadcaster)
1562 """
1563 SBCommandInterpreter handles/interprets commands for lldb. You get the
1564 command interpreter from the SBDebugger instance. For example (from test/
1565 python_api/interpreter/TestCommandInterpreterAPI.py),
1566
1567 def command_interpreter_api(self):
1568 '''Test the SBCommandInterpreter APIs.'''
1569 exe = os.path.join(os.getcwd(), 'a.out')
1570
1571 # Create a target by the debugger.
1572 target = self.dbg.CreateTarget(exe)
1573 self.assertTrue(target, VALID_TARGET)
1574
1575 # Retrieve the associated command interpreter from our debugger.
1576 ci = self.dbg.GetCommandInterpreter()
1577 self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
1578
1579 # Exercise some APIs....
1580
1581 self.assertTrue(ci.HasCommands())
1582 self.assertTrue(ci.HasAliases())
1583 self.assertTrue(ci.HasAliasOptions())
1584 self.assertTrue(ci.CommandExists('breakpoint'))
1585 self.assertTrue(ci.CommandExists('target'))
1586 self.assertTrue(ci.CommandExists('platform'))
1587 self.assertTrue(ci.AliasExists('file'))
1588 self.assertTrue(ci.AliasExists('run'))
1589 self.assertTrue(ci.AliasExists('bt'))
1590
1591 res = lldb.SBCommandReturnObject()
1592 ci.HandleCommand('breakpoint set -f main.c -l %d' % self.line, res)
1593 self.assertTrue(res.Succeeded())
1594 ci.HandleCommand('process launch', res)
1595 self.assertTrue(res.Succeeded())
1596
1597 process = ci.GetProcess()
1598 self.assertTrue(process)
1599
1600 ...
1601
1602 The HandleCommand() instance method takes two args: the command string and
1603 an SBCommandReturnObject instance which encapsulates the result of command
1604 execution.
1605
1606 """
1607 __swig_setmethods__ = {}
1608 __setattr__ = lambda self, name, value: _swig_setattr(self, SBCommandInterpreter, name, value)
1609 __swig_getmethods__ = {}
1610 __getattr__ = lambda self, name: _swig_getattr(self, SBCommandInterpreter, name)
1611 __repr__ = _swig_repr
1612 eBroadcastBitThreadShouldExit = _lldb.SBCommandInterpreter_eBroadcastBitThreadShouldExit
1613 eBroadcastBitResetPrompt = _lldb.SBCommandInterpreter_eBroadcastBitResetPrompt
1614 eBroadcastBitQuitCommandReceived = _lldb.SBCommandInterpreter_eBroadcastBitQuitCommandReceived
1615 eBroadcastBitAsynchronousOutputData = _lldb.SBCommandInterpreter_eBroadcastBitAsynchronousOutputData
1616 eBroadcastBitAsynchronousErrorData = _lldb.SBCommandInterpreter_eBroadcastBitAsynchronousErrorData
1618 """__init__(lldb::SBCommandInterpreter self, SBCommandInterpreter rhs) -> SBCommandInterpreter"""
1619 this = _lldb.new_SBCommandInterpreter(*args)
1620 try: self.this.append(this)
1621 except: self.this = this
1622 __swig_destroy__ = _lldb.delete_SBCommandInterpreter
1623 __del__ = lambda self : None;
1627
1628 if _newclass:GetArgumentTypeAsCString = staticmethod(GetArgumentTypeAsCString)
1629 __swig_getmethods__["GetArgumentTypeAsCString"] = lambda x: GetArgumentTypeAsCString
1633
1634 if _newclass:GetArgumentDescriptionAsCString = staticmethod(GetArgumentDescriptionAsCString)
1635 __swig_getmethods__["GetArgumentDescriptionAsCString"] = lambda x: GetArgumentDescriptionAsCString
1640
1644
1648
1652
1656
1657 if _newclass:GetBroadcasterClass = staticmethod(GetBroadcasterClass)
1658 __swig_getmethods__["GetBroadcasterClass"] = lambda x: GetBroadcasterClass
1662
1666
1670
1674
1678
1682
1686
1688 """
1689 HandleCommand(SBCommandInterpreter self, str const * command_line, SBCommandReturnObject result, bool add_to_history=False) -> lldb::ReturnStatus
1690 HandleCommand(SBCommandInterpreter self, str const * command_line, SBCommandReturnObject result) -> lldb::ReturnStatus
1691 """
1692 return _lldb.SBCommandInterpreter_HandleCommand(self, *args)
1693
1695 """
1696 HandleCompletion(SBCommandInterpreter self, str const * current_line, uint32_t cursor_pos, int match_start_point, int max_return_elements,
1697 SBStringList matches) -> int
1698 """
1699 return _lldb.SBCommandInterpreter_HandleCompletion(self, *args)
1700
1701 SBCommandInterpreter_swigregister = _lldb.SBCommandInterpreter_swigregister
1702 SBCommandInterpreter_swigregister(SBCommandInterpreter)
1707
1711
1715
1737 __swig_destroy__ = _lldb.delete_SBCommandReturnObject
1738 __del__ = lambda self : None;
1743
1747
1751
1753 """
1754 GetOutput(SBCommandReturnObject self) -> str const
1755 GetOutput(SBCommandReturnObject self, bool only_if_no_immediate) -> str const *
1756 """
1757 return _lldb.SBCommandReturnObject_GetOutput(self, *args)
1758
1760 """
1761 GetError(SBCommandReturnObject self) -> str const
1762 GetError(SBCommandReturnObject self, bool if_no_immediate) -> str const *
1763 """
1764 return _lldb.SBCommandReturnObject_GetError(self, *args)
1765
1769
1773
1777
1781
1783 """
1784 SetError(SBCommandReturnObject self, SBError error, str const * fallback_error_cstr=None)
1785 SetError(SBCommandReturnObject self, SBError error)
1786 SetError(SBCommandReturnObject self, str const * error_cstr)
1787 """
1788 return _lldb.SBCommandReturnObject_SetError(self, *args)
1789
1793
1797
1801
1805
1809
1813
1817
1821
1825
1826 - def Print(self, *args):
1829
1833
1834 - def write(self, *args):
1837
1841
1842 SBCommandReturnObject_swigregister = _lldb.SBCommandReturnObject_swigregister
1843 SBCommandReturnObject_swigregister(SBCommandReturnObject)
1866 __swig_destroy__ = _lldb.delete_SBCommunication
1867 __del__ = lambda self : None;
1872
1876
1880
1881 if _newclass:GetBroadcasterClass = staticmethod(GetBroadcasterClass)
1882 __swig_getmethods__["GetBroadcasterClass"] = lambda x: GetBroadcasterClass
1886
1888 """Connect(SBCommunication self, str const * url) -> lldb::ConnectionStatus"""
1889 return _lldb.SBCommunication_Connect(self, *args)
1890
1894
1898
1902
1906
1907 - def Read(self, *args):
1908 """Read(SBCommunication self, void * dst, size_t dst_len, uint32_t timeout_usec, lldb::ConnectionStatus & status) -> size_t"""
1909 return _lldb.SBCommunication_Read(self, *args)
1910
1911 - def Write(self, *args):
1912 """Write(SBCommunication self, void const * src, size_t src_len, lldb::ConnectionStatus & status) -> size_t"""
1913 return _lldb.SBCommunication_Write(self, *args)
1914
1918
1922
1926
1930
1931 SBCommunication_swigregister = _lldb.SBCommunication_swigregister
1932 SBCommunication_swigregister(SBCommunication)
1937
1939 """
1940 Represents a compilation unit, or compiled source file.
1941
1942 SBCompileUnit supports line entry iteration. For example,
1943
1944 # Now get the SBSymbolContext from this frame. We want everything. :-)
1945 context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
1946 ...
1947
1948 compileUnit = context.GetCompileUnit()
1949
1950 for lineEntry in compileUnit:
1951 print 'line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
1952 lineEntry.GetLine())
1953 print 'start addr: %s' % str(lineEntry.GetStartAddress())
1954 print 'end addr: %s' % str(lineEntry.GetEndAddress())
1955
1956 produces:
1957
1958 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
1959 start addr: a.out[0x100000d98]
1960 end addr: a.out[0x100000da3]
1961 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
1962 start addr: a.out[0x100000da3]
1963 end addr: a.out[0x100000da9]
1964 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
1965 start addr: a.out[0x100000da9]
1966 end addr: a.out[0x100000db6]
1967 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
1968 start addr: a.out[0x100000db6]
1969 end addr: a.out[0x100000dbc]
1970 ...
1971
1972 See also SBSymbolContext and SBLineEntry
1973 """
1974 __swig_setmethods__ = {}
1975 __setattr__ = lambda self, name, value: _swig_setattr(self, SBCompileUnit, name, value)
1976 __swig_getmethods__ = {}
1977 __getattr__ = lambda self, name: _swig_getattr(self, SBCompileUnit, name)
1978 __repr__ = _swig_repr
1979 - def __iter__(self): return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')
1982 """
1983 __init__(lldb::SBCompileUnit self) -> SBCompileUnit
1984 __init__(lldb::SBCompileUnit self, SBCompileUnit rhs) -> SBCompileUnit
1985 """
1986 this = _lldb.new_SBCompileUnit(*args)
1987 try: self.this.append(this)
1988 except: self.this = this
1989 __swig_destroy__ = _lldb.delete_SBCompileUnit
1990 __del__ = lambda self : None;
1995
1999
2003
2004 - def GetLineEntryAtIndex(self, *args):
2005 """GetLineEntryAtIndex(SBCompileUnit self, uint32_t idx) -> SBLineEntry"""
2006 return _lldb.SBCompileUnit_GetLineEntryAtIndex(self, *args)
2007
2008 - def FindLineEntryIndex(self, *args):
2009 """
2010 FindLineEntryIndex(SBCompileUnit self, uint32_t start_idx, uint32_t line, SBFileSpec inline_file_spec) -> uint32_t
2011 FindLineEntryIndex(SBCompileUnit self, uint32_t start_idx, uint32_t line, SBFileSpec inline_file_spec, bool exact) -> uint32_t
2012 """
2013 return _lldb.SBCompileUnit_FindLineEntryIndex(self, *args)
2014
2018
2022
2026
2028 """
2029 GetTypes(SBCompileUnit self, uint32_t type_mask=eTypeClassAny) -> SBTypeList
2030 GetTypes(SBCompileUnit self) -> SBTypeList
2031
2032 Get all types matching type_mask from debug info in this
2033 compile unit.
2034
2035 @param[in] type_mask
2036 A bitfield that consists of one or more bits logically OR'ed
2037 together from the lldb::TypeClass enumeration. This allows
2038 you to request only structure types, or only class, struct
2039 and union types. Passing in lldb::eTypeClassAny will return
2040 all types found in the debug information for this compile
2041 unit.
2042
2043 @return
2044 A list of types in this compile unit that match type_mask
2045 """
2046 return _lldb.SBCompileUnit_GetTypes(self, *args)
2047
2051
2055
2059
2060 __swig_getmethods__["file"] = GetFileSpec
2061 if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
2062
2063 __swig_getmethods__["num_line_entries"] = GetNumLineEntries
2064 if _newclass: num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
2065
2069
2071 if not isinstance(rhs, type(self)):
2072 return False
2073
2074 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
2075
2077 if not isinstance(rhs, type(self)):
2078 return True
2079
2080 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
2081
2082 SBCompileUnit_swigregister = _lldb.SBCompileUnit_swigregister
2083 SBCompileUnit_swigregister(SBCompileUnit)
2100 __swig_destroy__ = _lldb.delete_SBData
2101 __del__ = lambda self : None;
2105
2109
2111 """Clear(SBData self)"""
2112 return _lldb.SBData_Clear(self)
2113
2116 """IsValid(SBData self) -> bool"""
2117 return _lldb.SBData_IsValid(self)
2118
2122
2124 """GetByteOrder(SBData self) -> lldb::ByteOrder"""
2125 return _lldb.SBData_GetByteOrder(self)
2126
2130
2132 """GetFloat(SBData self, SBError error, lldb::offset_t offset) -> float"""
2133 return _lldb.SBData_GetFloat(self, *args)
2134
2136 """GetDouble(SBData self, SBError error, lldb::offset_t offset) -> double"""
2137 return _lldb.SBData_GetDouble(self, *args)
2138
2140 """GetLongDouble(SBData self, SBError error, lldb::offset_t offset) -> long double"""
2141 return _lldb.SBData_GetLongDouble(self, *args)
2142
2144 """GetAddress(SBData self, SBError error, lldb::offset_t offset) -> lldb::addr_t"""
2145 return _lldb.SBData_GetAddress(self, *args)
2146
2148 """GetUnsignedInt8(SBData self, SBError error, lldb::offset_t offset) -> uint8_t"""
2149 return _lldb.SBData_GetUnsignedInt8(self, *args)
2150
2152 """GetUnsignedInt16(SBData self, SBError error, lldb::offset_t offset) -> uint16_t"""
2153 return _lldb.SBData_GetUnsignedInt16(self, *args)
2154
2156 """GetUnsignedInt32(SBData self, SBError error, lldb::offset_t offset) -> uint32_t"""
2157 return _lldb.SBData_GetUnsignedInt32(self, *args)
2158
2160 """GetUnsignedInt64(SBData self, SBError error, lldb::offset_t offset) -> uint64_t"""
2161 return _lldb.SBData_GetUnsignedInt64(self, *args)
2162
2164 """GetSignedInt8(SBData self, SBError error, lldb::offset_t offset) -> int8_t"""
2165 return _lldb.SBData_GetSignedInt8(self, *args)
2166
2168 """GetSignedInt16(SBData self, SBError error, lldb::offset_t offset) -> int16_t"""
2169 return _lldb.SBData_GetSignedInt16(self, *args)
2170
2172 """GetSignedInt32(SBData self, SBError error, lldb::offset_t offset) -> int32_t"""
2173 return _lldb.SBData_GetSignedInt32(self, *args)
2174
2176 """GetSignedInt64(SBData self, SBError error, lldb::offset_t offset) -> int64_t"""
2177 return _lldb.SBData_GetSignedInt64(self, *args)
2178
2180 """GetString(SBData self, SBError error, lldb::offset_t offset) -> str const *"""
2181 return _lldb.SBData_GetString(self, *args)
2182
2184 """GetDescription(SBData self, SBStream description, lldb::addr_t base_addr) -> bool"""
2185 return _lldb.SBData_GetDescription(self, *args)
2186
2188 """ReadRawData(SBData self, SBError error, lldb::offset_t offset, void * buf) -> size_t"""
2189 return _lldb.SBData_ReadRawData(self, *args)
2190
2192 """SetData(SBData self, SBError error, void const * buf, lldb::ByteOrder endian, uint8_t addr_size)"""
2193 return _lldb.SBData_SetData(self, *args)
2194
2196 """Append(SBData self, SBData rhs) -> bool"""
2197 return _lldb.SBData_Append(self, *args)
2198
2200 """CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, str const * data) -> SBData"""
2201 return _lldb.SBData_CreateDataFromCString(*args)
2202
2203 if _newclass:CreateDataFromCString = staticmethod(CreateDataFromCString)
2204 __swig_getmethods__["CreateDataFromCString"] = lambda x: CreateDataFromCString
2208
2209 if _newclass:CreateDataFromUInt64Array = staticmethod(CreateDataFromUInt64Array)
2210 __swig_getmethods__["CreateDataFromUInt64Array"] = lambda x: CreateDataFromUInt64Array
2214
2215 if _newclass:CreateDataFromUInt32Array = staticmethod(CreateDataFromUInt32Array)
2216 __swig_getmethods__["CreateDataFromUInt32Array"] = lambda x: CreateDataFromUInt32Array
2220
2221 if _newclass:CreateDataFromSInt64Array = staticmethod(CreateDataFromSInt64Array)
2222 __swig_getmethods__["CreateDataFromSInt64Array"] = lambda x: CreateDataFromSInt64Array
2226
2227 if _newclass:CreateDataFromSInt32Array = staticmethod(CreateDataFromSInt32Array)
2228 __swig_getmethods__["CreateDataFromSInt32Array"] = lambda x: CreateDataFromSInt32Array
2232
2233 if _newclass:CreateDataFromDoubleArray = staticmethod(CreateDataFromDoubleArray)
2234 __swig_getmethods__["CreateDataFromDoubleArray"] = lambda x: CreateDataFromDoubleArray
2238
2242
2246
2250
2254
2258
2260 - def __init__(self, sbdata, readerfunc, item_size):
2261 self.sbdata = sbdata
2262 self.readerfunc = readerfunc
2263 self.item_size = item_size
2265 if isinstance(key,slice):
2266 list = []
2267 for x in range(*key.indices(self.__len__())):
2268 list.append(self.__getitem__(x))
2269 return list
2270 if not (isinstance(key,(int,long))):
2271 raise TypeError('must be int')
2272 key = key * self.item_size
2273 error = SBError()
2274 my_data = self.readerfunc(self.sbdata,error,key)
2275 if error.Fail():
2276 raise IndexError(error.GetCString())
2277 else:
2278 return my_data
2280 return int(self.sbdata.GetByteSize()/self.item_size)
2282 return self[0:len(self)]
2283
2284 @classmethod
2285 - def CreateDataFromInt (cls, value, size = None, target = None, ptr_size = None, endian = None):
2323
2326
2329
2332
2335
2338
2341
2344
2347
2350
2353
2356
2359
2362
2365
2368
2371
2374
2377
2380
2383
2386
2387 __swig_getmethods__["uint8"] = _make_helper_uint8
2388 if _newclass: uint8 = property(_make_helper_uint8, None, doc='''A read only property that returns an array-like object out of which you can read uint8 values.''')
2389
2390 __swig_getmethods__["uint16"] = _make_helper_uint16
2391 if _newclass: uint16 = property(_make_helper_uint16, None, doc='''A read only property that returns an array-like object out of which you can read uint16 values.''')
2392
2393 __swig_getmethods__["uint32"] = _make_helper_uint32
2394 if _newclass: uint32 = property(_make_helper_uint32, None, doc='''A read only property that returns an array-like object out of which you can read uint32 values.''')
2395
2396 __swig_getmethods__["uint64"] = _make_helper_uint64
2397 if _newclass: uint64 = property(_make_helper_uint64, None, doc='''A read only property that returns an array-like object out of which you can read uint64 values.''')
2398
2399 __swig_getmethods__["sint8"] = _make_helper_sint8
2400 if _newclass: sint8 = property(_make_helper_sint8, None, doc='''A read only property that returns an array-like object out of which you can read sint8 values.''')
2401
2402 __swig_getmethods__["sint16"] = _make_helper_sint16
2403 if _newclass: sint16 = property(_make_helper_sint16, None, doc='''A read only property that returns an array-like object out of which you can read sint16 values.''')
2404
2405 __swig_getmethods__["sint32"] = _make_helper_sint32
2406 if _newclass: sint32 = property(_make_helper_sint32, None, doc='''A read only property that returns an array-like object out of which you can read sint32 values.''')
2407
2408 __swig_getmethods__["sint64"] = _make_helper_sint64
2409 if _newclass: sint64 = property(_make_helper_sint64, None, doc='''A read only property that returns an array-like object out of which you can read sint64 values.''')
2410
2411 __swig_getmethods__["float"] = _make_helper_float
2412 if _newclass: float = property(_make_helper_float, None, doc='''A read only property that returns an array-like object out of which you can read float values.''')
2413
2414 __swig_getmethods__["double"] = _make_helper_double
2415 if _newclass: double = property(_make_helper_double, None, doc='''A read only property that returns an array-like object out of which you can read double values.''')
2416
2417 __swig_getmethods__["uint8s"] = _read_all_uint8
2418 if _newclass: uint8s = property(_read_all_uint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint8 values.''')
2419
2420 __swig_getmethods__["uint16s"] = _read_all_uint16
2421 if _newclass: uint16s = property(_read_all_uint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint16 values.''')
2422
2423 __swig_getmethods__["uint32s"] = _read_all_uint32
2424 if _newclass: uint32s = property(_read_all_uint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint32 values.''')
2425
2426 __swig_getmethods__["uint64s"] = _read_all_uint64
2427 if _newclass: uint64s = property(_read_all_uint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint64 values.''')
2428
2429 __swig_getmethods__["sint8s"] = _read_all_sint8
2430 if _newclass: sint8s = property(_read_all_sint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint8 values.''')
2431
2432 __swig_getmethods__["sint16s"] = _read_all_sint16
2433 if _newclass: sint16s = property(_read_all_sint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint16 values.''')
2434
2435 __swig_getmethods__["sint32s"] = _read_all_sint32
2436 if _newclass: sint32s = property(_read_all_sint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint32 values.''')
2437
2438 __swig_getmethods__["sint64s"] = _read_all_sint64
2439 if _newclass: sint64s = property(_read_all_sint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint64 values.''')
2440
2441 __swig_getmethods__["floats"] = _read_all_float
2442 if _newclass: floats = property(_read_all_float, None, doc='''A read only property that returns an array with all the contents of this SBData represented as float values.''')
2443
2444 __swig_getmethods__["doubles"] = _read_all_double
2445 if _newclass: doubles = property(_read_all_double, None, doc='''A read only property that returns an array with all the contents of this SBData represented as double values.''')
2446
2447
2448 __swig_getmethods__["byte_order"] = GetByteOrder
2449 __swig_setmethods__["byte_order"] = SetByteOrder
2450 if _newclass: byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''')
2451
2452 __swig_getmethods__["size"] = GetByteSize
2453 if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''')
2454
2455
2457 """__str__(SBData self) -> PyObject *"""
2458 return _lldb.SBData___str__(self)
2459
2460 SBData_swigregister = _lldb.SBData_swigregister
2461 SBData_swigregister(SBData)
2464 """SBData_CreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, str const * data) -> SBData"""
2465 return _lldb.SBData_CreateDataFromCString(*args)
2466
2470
2474
2478
2482
2486
2488 """
2489 SBDebugger is the primordial object that creates SBTargets and provides
2490 access to them. It also manages the overall debugging experiences.
2491
2492 For example (from example/disasm.py),
2493
2494 import lldb
2495 import os
2496 import sys
2497
2498 def disassemble_instructions (insts):
2499 for i in insts:
2500 print i
2501
2502 ...
2503
2504 # Create a new debugger instance
2505 debugger = lldb.SBDebugger.Create()
2506
2507 # When we step or continue, don't return from the function until the process
2508 # stops. We do this by setting the async mode to false.
2509 debugger.SetAsync (False)
2510
2511 # Create a target from a file and arch
2512 print 'Creating a target for '%s'' % exe
2513
2514 target = debugger.CreateTargetWithFileAndArch (exe, lldb.LLDB_ARCH_DEFAULT)
2515
2516 if target:
2517 # If the target is valid set a breakpoint at main
2518 main_bp = target.BreakpointCreateByName (fname, target.GetExecutable().GetFilename());
2519
2520 print main_bp
2521
2522 # Launch the process. Since we specified synchronous mode, we won't return
2523 # from this function until we hit the breakpoint at main
2524 process = target.LaunchSimple (None, None, os.getcwd())
2525
2526 # Make sure the launch went ok
2527 if process:
2528 # Print some simple process info
2529 state = process.GetState ()
2530 print process
2531 if state == lldb.eStateStopped:
2532 # Get the first thread
2533 thread = process.GetThreadAtIndex (0)
2534 if thread:
2535 # Print some simple thread info
2536 print thread
2537 # Get the first frame
2538 frame = thread.GetFrameAtIndex (0)
2539 if frame:
2540 # Print some simple frame info
2541 print frame
2542 function = frame.GetFunction()
2543 # See if we have debug info (a function)
2544 if function:
2545 # We do have a function, print some info for the function
2546 print function
2547 # Now get all instructions for this function and print them
2548 insts = function.GetInstructions(target)
2549 disassemble_instructions (insts)
2550 else:
2551 # See if we have a symbol in the symbol table for where we stopped
2552 symbol = frame.GetSymbol();
2553 if symbol:
2554 # We do have a symbol, print some info for the symbol
2555 print symbol
2556 # Now get all instructions for this symbol and print them
2557 insts = symbol.GetInstructions(target)
2558 disassemble_instructions (insts)
2559
2560 registerList = frame.GetRegisters()
2561 print 'Frame registers (size of register set = %d):' % registerList.GetSize()
2562 for value in registerList:
2563 #print value
2564 print '%s (number of children = %d):' % (value.GetName(), value.GetNumChildren())
2565 for child in value:
2566 print 'Name: ', child.GetName(), ' Value: ', child.GetValue()
2567
2568 print 'Hit the breakpoint at main, enter to continue and wait for program to exit or 'Ctrl-D'/'quit' to terminate the program'
2569 next = sys.stdin.readline()
2570 if not next or next.rstrip('
2571 ') == 'quit':
2572 print 'Terminating the inferior process...'
2573 process.Kill()
2574 else:
2575 # Now continue to the program exit
2576 process.Continue()
2577 # When we return from the above function we will hopefully be at the
2578 # program exit. Print out some process info
2579 print process
2580 elif state == lldb.eStateExited:
2581 print 'Didn't hit the breakpoint at main, program has exited...'
2582 else:
2583 print 'Unexpected process state: %s, killing process...' % debugger.StateAsCString (state)
2584 process.Kill()
2585
2586 """
2587 __swig_setmethods__ = {}
2588 __setattr__ = lambda self, name, value: _swig_setattr(self, SBDebugger, name, value)
2589 __swig_getmethods__ = {}
2590 __getattr__ = lambda self, name: _swig_getattr(self, SBDebugger, name)
2591 __repr__ = _swig_repr
2595
2596 if _newclass:Initialize = staticmethod(Initialize)
2597 __swig_getmethods__["Initialize"] = lambda x: Initialize
2601
2602 if _newclass:Terminate = staticmethod(Terminate)
2603 __swig_getmethods__["Terminate"] = lambda x: Terminate
2605 """
2606 Create() -> SBDebugger
2607 Create(bool source_init_files) -> SBDebugger
2608 Create(bool source_init_files, lldb::LogOutputCallback log_callback) -> SBDebugger
2609 """
2610 return _lldb.SBDebugger_Create(*args)
2611
2612 if _newclass:Create = staticmethod(Create)
2613 __swig_getmethods__["Create"] = lambda x: Create
2617
2618 if _newclass:Destroy = staticmethod(Destroy)
2619 __swig_getmethods__["Destroy"] = lambda x: Destroy
2623
2624 if _newclass:MemoryPressureDetected = staticmethod(MemoryPressureDetected)
2625 __swig_getmethods__["MemoryPressureDetected"] = lambda x: MemoryPressureDetected
2629 """
2630 __init__(lldb::SBDebugger self) -> SBDebugger
2631 __init__(lldb::SBDebugger self, SBDebugger rhs) -> SBDebugger
2632 """
2633 this = _lldb.new_SBDebugger(*args)
2634 try: self.this.append(this)
2635 except: self.this = this
2636 __swig_destroy__ = _lldb.delete_SBDebugger
2637 __del__ = lambda self : None;
2642
2646
2650
2654
2658
2662
2666
2670
2674
2678
2682
2686
2690
2694
2696 """HandleProcessEvent(SBDebugger self, SBProcess process, SBEvent event, FILE * out, FILE * err)"""
2697 return _lldb.SBDebugger_HandleProcessEvent(self, *args)
2698
2702
2706
2708 """
2709 CreateTarget(SBDebugger self, str const * filename, str const * target_triple, str const * platform_name, bool add_dependent_modules,
2710 SBError sb_error) -> SBTarget
2711 CreateTarget(SBDebugger self, str const * filename) -> SBTarget
2712 """
2713 return _lldb.SBDebugger_CreateTarget(self, *args)
2714
2716 """
2717 DeleteTarget(SBDebugger self, SBTarget target) -> bool
2718
2719 Return true if target is deleted from the target list of the debugger.
2720 """
2721 return _lldb.SBDebugger_DeleteTarget(self, *args)
2722
2726
2730
2734
2738
2742
2746
2750
2754
2758
2762
2766
2770
2774
2775 if _newclass:GetDefaultArchitecture = staticmethod(GetDefaultArchitecture)
2776 __swig_getmethods__["GetDefaultArchitecture"] = lambda x: GetDefaultArchitecture
2780
2781 if _newclass:SetDefaultArchitecture = staticmethod(SetDefaultArchitecture)
2782 __swig_getmethods__["SetDefaultArchitecture"] = lambda x: SetDefaultArchitecture
2786
2790
2791 if _newclass:GetVersionString = staticmethod(GetVersionString)
2792 __swig_getmethods__["GetVersionString"] = lambda x: GetVersionString
2796
2797 if _newclass:StateAsCString = staticmethod(StateAsCString)
2798 __swig_getmethods__["StateAsCString"] = lambda x: StateAsCString
2802
2803 if _newclass:StateIsRunningState = staticmethod(StateIsRunningState)
2804 __swig_getmethods__["StateIsRunningState"] = lambda x: StateIsRunningState
2808
2809 if _newclass:StateIsStoppedState = staticmethod(StateIsStoppedState)
2810 __swig_getmethods__["StateIsStoppedState"] = lambda x: StateIsStoppedState
2812 """EnableLog(SBDebugger self, str const * channel, str const ** types) -> bool"""
2813 return _lldb.SBDebugger_EnableLog(self, *args)
2814
2818
2822
2826
2830
2834
2838
2842
2846
2850
2851 if _newclass:FindDebuggerWithID = staticmethod(FindDebuggerWithID)
2852 __swig_getmethods__["FindDebuggerWithID"] = lambda x: FindDebuggerWithID
2854 """SetInternalVariable(str const * var_name, str const * value, str const * debugger_instance_name) -> SBError"""
2855 return _lldb.SBDebugger_SetInternalVariable(*args)
2856
2857 if _newclass:SetInternalVariable = staticmethod(SetInternalVariable)
2858 __swig_getmethods__["SetInternalVariable"] = lambda x: SetInternalVariable
2862
2863 if _newclass:GetInternalVariableValue = staticmethod(GetInternalVariableValue)
2864 __swig_getmethods__["GetInternalVariableValue"] = lambda x: GetInternalVariableValue
2868
2872
2876
2878 """GetID(SBDebugger self) -> lldb::user_id_t"""
2879 return _lldb.SBDebugger_GetID(self)
2880
2884
2888
2892
2896
2900
2904
2906 """GetCategory(SBDebugger self, str const * category_name) -> SBTypeCategory"""
2907 return _lldb.SBDebugger_GetCategory(self, *args)
2908
2912
2916
2920
2924
2928
2932
2936
2940
2944
2946 """__str__(SBDebugger self) -> PyObject *"""
2947 return _lldb.SBDebugger___str__(self)
2948
2949 SBDebugger_swigregister = _lldb.SBDebugger_swigregister
2950 SBDebugger_swigregister(SBDebugger)
2955
2959
2961 """
2962 Create() -> SBDebugger
2963 Create(bool source_init_files) -> SBDebugger
2964 SBDebugger_Create(bool source_init_files, lldb::LogOutputCallback log_callback) -> SBDebugger
2965 """
2966 return _lldb.SBDebugger_Create(*args)
2967
2971
2975
2979
2983
2987
2991
2995
2999
3003
3005 """SBDebugger_SetInternalVariable(str const * var_name, str const * value, str const * debugger_instance_name) -> SBError"""
3006 return _lldb.SBDebugger_SetInternalVariable(*args)
3007
3011
3027 __swig_destroy__ = _lldb.delete_SBDeclaration
3028 __del__ = lambda self : None;
3033
3037
3041
3045
3049
3053
3057
3061
3065
3069
3070 __swig_getmethods__["file"] = GetFileSpec
3071 if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
3072
3073 __swig_getmethods__["line"] = GetLine
3074 if _newclass: ling = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
3075
3076 __swig_getmethods__["column"] = GetColumn
3077 if _newclass: column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
3078
3082
3084 if not isinstance(rhs, type(self)):
3085 return False
3086
3087 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
3088
3090 if not isinstance(rhs, type(self)):
3091 return True
3092
3093 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
3094
3095 SBDeclaration_swigregister = _lldb.SBDeclaration_swigregister
3096 SBDeclaration_swigregister(SBDeclaration)
3099 """
3100 Represents a container for holding any error code.
3101
3102 For example (from test/python_api/hello_world/TestHelloWorld.py),
3103
3104 def hello_world_attach_with_id_api(self):
3105 '''Create target, spawn a process, and attach to it by id.'''
3106
3107 target = self.dbg.CreateTarget(self.exe)
3108
3109 # Spawn a new process and don't display the stdout if not in TraceOn() mode.
3110 import subprocess
3111 popen = subprocess.Popen([self.exe, 'abc', 'xyz'],
3112 stdout = open(os.devnull, 'w') if not self.TraceOn() else None)
3113
3114 listener = lldb.SBListener('my.attach.listener')
3115 error = lldb.SBError()
3116 process = target.AttachToProcessWithID(listener, popen.pid, error)
3117
3118 self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
3119
3120 # Let's check the stack traces of the attached process.
3121 import lldbutil
3122 stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
3123 self.expect(stacktraces, exe=False,
3124 substrs = ['main.c:%d' % self.line2,
3125 '(int)argc=3'])
3126
3127 listener = lldb.SBListener('my.attach.listener')
3128 error = lldb.SBError()
3129 process = target.AttachToProcessWithID(listener, popen.pid, error)
3130
3131 self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
3132
3133 checks that after the attach, there is no error condition by asserting
3134 that error.Success() is True and we get back a valid process object.
3135
3136 And (from test/python_api/event/TestEvent.py),
3137
3138 # Now launch the process, and do not stop at entry point.
3139 error = lldb.SBError()
3140 process = target.Launch(listener, None, None, None, None, None, None, 0, False, error)
3141 self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
3142
3143 checks that after calling the target.Launch() method there's no error
3144 condition and we get back a void process object.
3145
3146 """
3147 __swig_setmethods__ = {}
3148 __setattr__ = lambda self, name, value: _swig_setattr(self, SBError, name, value)
3149 __swig_getmethods__ = {}
3150 __getattr__ = lambda self, name: _swig_getattr(self, SBError, name)
3151 __repr__ = _swig_repr
3153 """
3154 __init__(lldb::SBError self) -> SBError
3155 __init__(lldb::SBError self, SBError rhs) -> SBError
3156 """
3157 this = _lldb.new_SBError(*args)
3158 try: self.this.append(this)
3159 except: self.this = this
3160 __swig_destroy__ = _lldb.delete_SBError
3161 __del__ = lambda self : None;
3163 """GetCString(SBError self) -> str const *"""
3164 return _lldb.SBError_GetCString(self)
3165
3167 """Clear(SBError self)"""
3168 return _lldb.SBError_Clear(self)
3169
3171 """Fail(SBError self) -> bool"""
3172 return _lldb.SBError_Fail(self)
3173
3175 """Success(SBError self) -> bool"""
3176 return _lldb.SBError_Success(self)
3177
3179 """GetError(SBError self) -> uint32_t"""
3180 return _lldb.SBError_GetError(self)
3181
3183 """GetType(SBError self) -> lldb::ErrorType"""
3184 return _lldb.SBError_GetType(self)
3185
3187 """SetError(SBError self, uint32_t err, lldb::ErrorType type)"""
3188 return _lldb.SBError_SetError(self, *args)
3189
3193
3197
3201
3205
3208 """IsValid(SBError self) -> bool"""
3209 return _lldb.SBError_IsValid(self)
3210
3214
3215 __swig_getmethods__["value"] = GetError
3216 if _newclass: value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''')
3217
3218 __swig_getmethods__["fail"] = Fail
3219 if _newclass: fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''')
3220
3221 __swig_getmethods__["success"] = Success
3222 if _newclass: success = property(Success, None, doc='''A read only property that returns the same result as Success().''')
3223
3224 __swig_getmethods__["description"] = GetCString
3225 if _newclass: description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''')
3226
3227 __swig_getmethods__["type"] = GetType
3228 if _newclass: type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''')
3229
3230
3232 """__str__(SBError self) -> PyObject *"""
3233 return _lldb.SBError___str__(self)
3234
3235 SBError_swigregister = _lldb.SBError_swigregister
3236 SBError_swigregister(SBError)
3239 """
3240 API clients can register to receive events.
3241
3242 For example, check out the following output:
3243
3244 Try wait for event...
3245 Event description: 0x103d0bb70 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = running}
3246 Event data flavor: Process::ProcessEventData
3247 Process state: running
3248
3249 Try wait for event...
3250 Event description: 0x103a700a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = stopped}
3251 Event data flavor: Process::ProcessEventData
3252 Process state: stopped
3253
3254 Try wait for event...
3255 Event description: 0x103d0d4a0 Event: broadcaster = 0x1009c8410, type = 0x00000001, data = { process = 0x1009c8400 (pid = 21528), state = exited}
3256 Event data flavor: Process::ProcessEventData
3257 Process state: exited
3258
3259 Try wait for event...
3260 timeout occurred waiting for event...
3261
3262 from test/python_api/event/TestEventspy:
3263
3264 def do_listen_for_and_print_event(self):
3265 '''Create a listener and use SBEvent API to print the events received.'''
3266 exe = os.path.join(os.getcwd(), 'a.out')
3267
3268 # Create a target by the debugger.
3269 target = self.dbg.CreateTarget(exe)
3270 self.assertTrue(target, VALID_TARGET)
3271
3272 # Now create a breakpoint on main.c by name 'c'.
3273 breakpoint = target.BreakpointCreateByName('c', 'a.out')
3274
3275 # Now launch the process, and do not stop at the entry point.
3276 process = target.LaunchSimple(None, None, os.getcwd())
3277 self.assertTrue(process.GetState() == lldb.eStateStopped,
3278 PROCESS_STOPPED)
3279
3280 # Get a handle on the process's broadcaster.
3281 broadcaster = process.GetBroadcaster()
3282
3283 # Create an empty event object.
3284 event = lldb.SBEvent()
3285
3286 # Create a listener object and register with the broadcaster.
3287 listener = lldb.SBListener('my listener')
3288 rc = broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)
3289 self.assertTrue(rc, 'AddListener successfully retruns')
3290
3291 traceOn = self.TraceOn()
3292 if traceOn:
3293 lldbutil.print_stacktraces(process)
3294
3295 # Create MyListeningThread class to wait for any kind of event.
3296 import threading
3297 class MyListeningThread(threading.Thread):
3298 def run(self):
3299 count = 0
3300 # Let's only try at most 4 times to retrieve any kind of event.
3301 # After that, the thread exits.
3302 while not count > 3:
3303 if traceOn:
3304 print 'Try wait for event...'
3305 if listener.WaitForEventForBroadcasterWithType(5,
3306 broadcaster,
3307 lldb.SBProcess.eBroadcastBitStateChanged,
3308 event):
3309 if traceOn:
3310 desc = lldbutil.get_description(event)
3311 print 'Event description:', desc
3312 print 'Event data flavor:', event.GetDataFlavor()
3313 print 'Process state:', lldbutil.state_type_to_str(process.GetState())
3314 print
3315 else:
3316 if traceOn:
3317 print 'timeout occurred waiting for event...'
3318 count = count + 1
3319 return
3320
3321 # Let's start the listening thread to retrieve the events.
3322 my_thread = MyListeningThread()
3323 my_thread.start()
3324
3325 # Use Python API to continue the process. The listening thread should be
3326 # able to receive the state changed events.
3327 process.Continue()
3328
3329 # Use Python API to kill the process. The listening thread should be
3330 # able to receive the state changed event, too.
3331 process.Kill()
3332
3333 # Wait until the 'MyListeningThread' terminates.
3334 my_thread.join()
3335
3336 """
3337 __swig_setmethods__ = {}
3338 __setattr__ = lambda self, name, value: _swig_setattr(self, SBEvent, name, value)
3339 __swig_getmethods__ = {}
3340 __getattr__ = lambda self, name: _swig_getattr(self, SBEvent, name)
3341 __repr__ = _swig_repr
3343 """
3344 __init__(lldb::SBEvent self) -> SBEvent
3345 __init__(lldb::SBEvent self, SBEvent rhs) -> SBEvent
3346 __init__(self, int type, str data) -> SBEvent (make an event that contains a C string)
3347 """
3348 this = _lldb.new_SBEvent(*args)
3349 try: self.this.append(this)
3350 except: self.this = this
3351 __swig_destroy__ = _lldb.delete_SBEvent
3352 __del__ = lambda self : None;
3355 """IsValid(SBEvent self) -> bool"""
3356 return _lldb.SBEvent_IsValid(self)
3357
3361
3363 """GetType(SBEvent self) -> uint32_t"""
3364 return _lldb.SBEvent_GetType(self)
3365
3369
3373
3377
3379 """Clear(SBEvent self)"""
3380 return _lldb.SBEvent_Clear(self)
3381
3385
3386 if _newclass:GetCStringFromEvent = staticmethod(GetCStringFromEvent)
3387 __swig_getmethods__["GetCStringFromEvent"] = lambda x: GetCStringFromEvent
3391
3392 SBEvent_swigregister = _lldb.SBEvent_swigregister
3393 SBEvent_swigregister(SBEvent)
3398
3414 __swig_destroy__ = _lldb.delete_SBExpressionOptions
3415 __del__ = lambda self : None;
3419
3421 """
3422 SetCoerceResultToId(SBExpressionOptions self, bool coerce=True)
3423 SetCoerceResultToId(SBExpressionOptions self)
3424
3425 Sets whether to coerce the expression result to ObjC id type after evaluation.
3426 """
3427 return _lldb.SBExpressionOptions_SetCoerceResultToId(self, coerce)
3428
3432
3434 """
3435 SetUnwindOnError(SBExpressionOptions self, bool unwind=True)
3436 SetUnwindOnError(SBExpressionOptions self)
3437
3438 Sets whether to unwind the expression stack on error.
3439 """
3440 return _lldb.SBExpressionOptions_SetUnwindOnError(self, unwind)
3441
3445
3447 """
3448 SetIgnoreBreakpoints(SBExpressionOptions self, bool ignore=True)
3449 SetIgnoreBreakpoints(SBExpressionOptions self)
3450 """
3451 return _lldb.SBExpressionOptions_SetIgnoreBreakpoints(self, ignore)
3452
3456
3458 """
3459 SetFetchDynamicValue(SBExpressionOptions self, lldb::DynamicValueType dynamic=eDynamicCanRunTarget)
3460 SetFetchDynamicValue(SBExpressionOptions self)
3461
3462 Sets whether to cast the expression result to its dynamic type.
3463 """
3464 return _lldb.SBExpressionOptions_SetFetchDynamicValue(self, *args)
3465
3469
3471 """
3472 SetTimeoutInMicroSeconds(SBExpressionOptions self, uint32_t timeout=0)
3473 SetTimeoutInMicroSeconds(SBExpressionOptions self)
3474
3475 Sets the timeout in microseconds to run the expression for. If try all threads is set to true and the expression doesn't complete within the specified timeout, all threads will be resumed for the same timeout to see if the expresson will finish.
3476 """
3477 return _lldb.SBExpressionOptions_SetTimeoutInMicroSeconds(self, timeout)
3478
3482
3484 """
3485 SetTryAllThreads(SBExpressionOptions self, bool run_others=True)
3486 SetTryAllThreads(SBExpressionOptions self)
3487
3488 Sets whether to run all threads if the expression does not complete on one thread.
3489 """
3490 return _lldb.SBExpressionOptions_SetTryAllThreads(self, run_others)
3491
3492 SBExpressionOptions_swigregister = _lldb.SBExpressionOptions_swigregister
3493 SBExpressionOptions_swigregister(SBExpressionOptions)
3496 """
3497 Represents a file specfication that divides the path into a directory and
3498 basename. The string values of the paths are put into uniqued string pools
3499 for fast comparisons and efficient memory usage.
3500
3501 For example, the following code
3502
3503 lineEntry = context.GetLineEntry()
3504 self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
3505 exe=False,
3506 substrs = [self.mydir])
3507 self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename',
3508 exe=False,
3509 substrs = ['main.c'])
3510 self.assertTrue(lineEntry.GetLine() == self.line,
3511 'The line entry's line number should match ')
3512
3513 gets the line entry from the symbol context when a thread is stopped.
3514 It gets the file spec corresponding to the line entry and checks that
3515 the filename and the directory matches wat we expect.
3516
3517 """
3518 __swig_setmethods__ = {}
3519 __setattr__ = lambda self, name, value: _swig_setattr(self, SBFileSpec, name, value)
3520 __swig_getmethods__ = {}
3521 __getattr__ = lambda self, name: _swig_getattr(self, SBFileSpec, name)
3522 __repr__ = _swig_repr
3526 """
3527 __init__(lldb::SBFileSpec self) -> SBFileSpec
3528 __init__(lldb::SBFileSpec self, SBFileSpec rhs) -> SBFileSpec
3529 __init__(lldb::SBFileSpec self, str const * path) -> SBFileSpec
3530 __init__(lldb::SBFileSpec self, str const * path, bool resolve) -> SBFileSpec
3531 """
3532 this = _lldb.new_SBFileSpec(*args)
3533 try: self.this.append(this)
3534 except: self.this = this
3535 __swig_destroy__ = _lldb.delete_SBFileSpec
3536 __del__ = lambda self : None;
3541
3545
3549
3553
3557
3559 """GetPath(SBFileSpec self, str * dst_path, size_t dst_len) -> uint32_t"""
3560 return _lldb.SBFileSpec_GetPath(self, *args)
3561
3563 """ResolvePath(str const * src_path, str * dst_path, size_t dst_len) -> int"""
3564 return _lldb.SBFileSpec_ResolvePath(*args)
3565
3566 if _newclass:ResolvePath = staticmethod(ResolvePath)
3567 __swig_getmethods__["ResolvePath"] = lambda x: ResolvePath
3571
3573 spec_dir = self.GetDirectory()
3574 spec_file = self.GetFilename()
3575 if spec_dir and spec_file:
3576 return '%s/%s' % (spec_dir, spec_file)
3577 elif spec_dir:
3578 return spec_dir
3579 elif spec_file:
3580 return spec_file
3581 return None
3582
3583 __swig_getmethods__["fullpath"] = __get_fullpath__
3584 if _newclass: fullpath = property(__get_fullpath__, None, doc='''A read only property that returns the fullpath as a python string.''')
3585
3586 __swig_getmethods__["basename"] = GetFilename
3587 if _newclass: basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''')
3588
3589 __swig_getmethods__["dirname"] = GetDirectory
3590 if _newclass: dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''')
3591
3592 __swig_getmethods__["exists"] = Exists
3593 if _newclass: exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
3594
3596 """__str__(SBFileSpec self) -> PyObject *"""
3597 return _lldb.SBFileSpec___str__(self)
3598
3599 SBFileSpec_swigregister = _lldb.SBFileSpec_swigregister
3600 SBFileSpec_swigregister(SBFileSpec)
3603 """SBFileSpec_ResolvePath(str const * src_path, str * dst_path, size_t dst_len) -> int"""
3604 return _lldb.SBFileSpec_ResolvePath(*args)
3605
3621 __swig_destroy__ = _lldb.delete_SBFileSpecList
3622 __del__ = lambda self : None;
3626
3630
3634
3638
3642
3644 """FindFileIndex(SBFileSpecList self, uint32_t idx, SBFileSpec sb_file, bool full) -> uint32_t"""
3645 return _lldb.SBFileSpecList_FindFileIndex(self, *args)
3646
3650
3651 SBFileSpecList_swigregister = _lldb.SBFileSpecList_swigregister
3652 SBFileSpecList_swigregister(SBFileSpecList)
3655 """
3656 Represents one of the stack frames associated with a thread.
3657 SBThread contains SBFrame(s). For example (from test/lldbutil.py),
3658
3659 def print_stacktrace(thread, string_buffer = False):
3660 '''Prints a simple stack trace of this thread.'''
3661
3662 ...
3663
3664 for i in range(depth):
3665 frame = thread.GetFrameAtIndex(i)
3666 function = frame.GetFunction()
3667
3668 load_addr = addrs[i].GetLoadAddress(target)
3669 if not function:
3670 file_addr = addrs[i].GetFileAddress()
3671 start_addr = frame.GetSymbol().GetStartAddress().GetFileAddress()
3672 symbol_offset = file_addr - start_addr
3673 print >> output, ' frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
3674 num=i, addr=load_addr, mod=mods[i], symbol=symbols[i], offset=symbol_offset)
3675 else:
3676 print >> output, ' frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
3677 num=i, addr=load_addr, mod=mods[i],
3678 func='%s [inlined]' % funcs[i] if frame.IsInlined() else funcs[i],
3679 file=files[i], line=lines[i],
3680 args=get_args_as_string(frame, showFuncName=False) if not frame.IsInlined() else '()')
3681
3682 ...
3683
3684 And,
3685
3686 for frame in thread:
3687 print frame
3688
3689 See also SBThread.
3690 """
3691 __swig_setmethods__ = {}
3692 __setattr__ = lambda self, name, value: _swig_setattr(self, SBFrame, name, value)
3693 __swig_getmethods__ = {}
3694 __getattr__ = lambda self, name: _swig_getattr(self, SBFrame, name)
3695 __repr__ = _swig_repr
3697 """
3698 __init__(lldb::SBFrame self) -> SBFrame
3699 __init__(lldb::SBFrame self, SBFrame rhs) -> SBFrame
3700 """
3701 this = _lldb.new_SBFrame(*args)
3702 try: self.this.append(this)
3703 except: self.this = this
3704 __swig_destroy__ = _lldb.delete_SBFrame
3705 __del__ = lambda self : None;
3707 """IsEqual(SBFrame self, SBFrame rhs) -> bool"""
3708 return _lldb.SBFrame_IsEqual(self, *args)
3709
3712 """IsValid(SBFrame self) -> bool"""
3713 return _lldb.SBFrame_IsValid(self)
3714
3716 """GetFrameID(SBFrame self) -> uint32_t"""
3717 return _lldb.SBFrame_GetFrameID(self)
3718
3720 """GetPC(SBFrame self) -> lldb::addr_t"""
3721 return _lldb.SBFrame_GetPC(self)
3722
3723 - def SetPC(self, *args):
3724 """SetPC(SBFrame self, lldb::addr_t new_pc) -> bool"""
3725 return _lldb.SBFrame_SetPC(self, *args)
3726
3728 """GetSP(SBFrame self) -> lldb::addr_t"""
3729 return _lldb.SBFrame_GetSP(self)
3730
3732 """GetFP(SBFrame self) -> lldb::addr_t"""
3733 return _lldb.SBFrame_GetFP(self)
3734
3738
3739 - def GetSymbolContext(self, *args):
3740 """GetSymbolContext(SBFrame self, uint32_t resolve_scope) -> SBSymbolContext"""
3741 return _lldb.SBFrame_GetSymbolContext(self, *args)
3742
3744 """GetModule(SBFrame self) -> SBModule"""
3745 return _lldb.SBFrame_GetModule(self)
3746
3750
3754
3756 """GetSymbol(SBFrame self) -> SBSymbol"""
3757 return _lldb.SBFrame_GetSymbol(self)
3758
3760 """
3761 GetBlock(SBFrame self) -> SBBlock
3762
3763 Gets the deepest block that contains the frame PC.
3764
3765 See also GetFrameBlock().
3766 """
3767 return _lldb.SBFrame_GetBlock(self)
3768
3770 """
3771 GetFunctionName(SBFrame self) -> str const *
3772
3773 Get the appropriate function name for this frame. Inlined functions in
3774 LLDB are represented by Blocks that have inlined function information, so
3775 just looking at the SBFunction or SBSymbol for a frame isn't enough.
3776 This function will return the appriopriate function, symbol or inlined
3777 function name for the frame.
3778
3779 This function returns:
3780 - the name of the inlined function (if there is one)
3781 - the name of the concrete function (if there is one)
3782 - the name of the symbol (if there is one)
3783 - NULL
3784
3785 See also IsInlined().
3786 """
3787 return _lldb.SBFrame_GetFunctionName(self)
3788
3790 """
3791 IsInlined(SBFrame self) -> bool
3792
3793 Return true if this frame represents an inlined function.
3794
3795 See also GetFunctionName().
3796 """
3797 return _lldb.SBFrame_IsInlined(self)
3798
3800 """
3801 EvaluateExpression(SBFrame self, str const * expr) -> SBValue
3802 EvaluateExpression(SBFrame self, str const * expr, lldb::DynamicValueType use_dynamic) -> SBValue
3803 EvaluateExpression(SBFrame self, str const * expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error) -> SBValue
3804 EvaluateExpression(SBFrame self, str const * expr, SBExpressionOptions options) -> SBValue
3805
3806 The version that doesn't supply a 'use_dynamic' value will use the
3807 target's default.
3808 """
3809 return _lldb.SBFrame_EvaluateExpression(self, *args)
3810
3812 """
3813 GetFrameBlock(SBFrame self) -> SBBlock
3814
3815 Gets the lexical block that defines the stack frame. Another way to think
3816 of this is it will return the block that contains all of the variables
3817 for a stack frame. Inlined functions are represented as SBBlock objects
3818 that have inlined function information: the name of the inlined function,
3819 where it was called from. The block that is returned will be the first
3820 block at or above the block for the PC (SBFrame::GetBlock()) that defines
3821 the scope of the frame. When a function contains no inlined functions,
3822 this will be the top most lexical block that defines the function.
3823 When a function has inlined functions and the PC is currently
3824 in one of those inlined functions, this method will return the inlined
3825 block that defines this frame. If the PC isn't currently in an inlined
3826 function, the lexical block that defines the function is returned.
3827 """
3828 return _lldb.SBFrame_GetFrameBlock(self)
3829
3830 - def GetLineEntry(self):
3831 """GetLineEntry(SBFrame self) -> SBLineEntry"""
3832 return _lldb.SBFrame_GetLineEntry(self)
3833
3835 """GetThread(SBFrame self) -> SBThread"""
3836 return _lldb.SBFrame_GetThread(self)
3837
3839 """Disassemble(SBFrame self) -> str const *"""
3840 return _lldb.SBFrame_Disassemble(self)
3841
3843 """Clear(SBFrame self)"""
3844 return _lldb.SBFrame_Clear(self)
3845
3847 """
3848 GetVariables(SBFrame self, bool arguments, bool locals, bool statics, bool in_scope_only) -> SBValueList
3849 GetVariables(SBFrame self, bool arguments, bool locals, bool statics, bool in_scope_only, lldb::DynamicValueType use_dynamic) -> SBValueList
3850
3851 The version that doesn't supply a 'use_dynamic' value will use the
3852 target's default.
3853 """
3854 return _lldb.SBFrame_GetVariables(self, *args)
3855
3859
3861 """
3862 FindVariable(SBFrame self, str const * var_name) -> SBValue
3863 FindVariable(SBFrame self, str const * var_name, lldb::DynamicValueType use_dynamic) -> SBValue
3864
3865 The version that doesn't supply a 'use_dynamic' value will use the
3866 target's default.
3867 """
3868 return _lldb.SBFrame_FindVariable(self, *args)
3869
3871 """
3872 GetValueForVariablePath(SBFrame self, str const * var_path) -> SBValue
3873 GetValueForVariablePath(SBFrame self, str const * var_path, lldb::DynamicValueType use_dynamic) -> SBValue
3874
3875 Get a lldb.SBValue for a variable path.
3876
3877 Variable paths can include access to pointer or instance members:
3878 rect_ptr->origin.y
3879 pt.x
3880 Pointer dereferences:
3881 *this->foo_ptr
3882 **argv
3883 Address of:
3884 &pt
3885 &my_array[3].x
3886 Array accesses and treating pointers as arrays:
3887 int_array[1]
3888 pt_ptr[22].x
3889
3890 Unlike EvaluateExpression() which returns lldb.SBValue objects
3891 with constant copies of the values at the time of evaluation,
3892 the result of this function is a value that will continue to
3893 track the current value of the value as execution progresses
3894 in the current frame.
3895 """
3896 return _lldb.SBFrame_GetValueForVariablePath(self, *args)
3897
3899 """
3900 FindValue(SBFrame self, str const * name, lldb::ValueType value_type) -> SBValue
3901 FindValue(SBFrame self, str const * name, lldb::ValueType value_type, lldb::DynamicValueType use_dynamic) -> SBValue
3902
3903 Find variables, register sets, registers, or persistent variables using
3904 the frame as the scope.
3905
3906 The version that doesn't supply a 'use_dynamic' value will use the
3907 target's default.
3908 """
3909 return _lldb.SBFrame_FindValue(self, *args)
3910
3914
3917
3920
3923
3926
3927 - def var(self, var_expr_path):
3928 '''Calls through to lldb.SBFrame.GetValueForVariablePath() and returns
3929 a value that represents the variable expression path'''
3930 return self.GetValueForVariablePath(var_expr_path)
3931
3932 __swig_getmethods__["pc"] = GetPC
3933 __swig_setmethods__["pc"] = SetPC
3934 if _newclass: pc = property(GetPC, SetPC)
3935
3936 __swig_getmethods__["addr"] = GetPCAddress
3937 if _newclass: addr = property(GetPCAddress, None, doc='''A read only property that returns the program counter (PC) as a section offset address (lldb.SBAddress).''')
3938
3939 __swig_getmethods__["fp"] = GetFP
3940 if _newclass: fp = property(GetFP, None, doc='''A read only property that returns the frame pointer (FP) as an unsigned integer.''')
3941
3942 __swig_getmethods__["sp"] = GetSP
3943 if _newclass: sp = property(GetSP, None, doc='''A read only property that returns the stack pointer (SP) as an unsigned integer.''')
3944
3945 __swig_getmethods__["module"] = GetModule
3946 if _newclass: module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) for this stack frame.''')
3947
3948 __swig_getmethods__["compile_unit"] = GetCompileUnit
3949 if _newclass: compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) for this stack frame.''')
3950
3951 __swig_getmethods__["function"] = GetFunction
3952 if _newclass: function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) for this stack frame.''')
3953
3954 __swig_getmethods__["symbol"] = GetSymbol
3955 if _newclass: symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) for this stack frame.''')
3956
3957 __swig_getmethods__["block"] = GetBlock
3958 if _newclass: block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) for this stack frame.''')
3959
3960 __swig_getmethods__["is_inlined"] = IsInlined
3961 if _newclass: is_inlined = property(IsInlined, None, doc='''A read only property that returns an boolean that indicates if the block frame is an inlined function.''')
3962
3963 __swig_getmethods__["name"] = GetFunctionName
3964 if _newclass: name = property(GetFunctionName, None, doc='''A read only property that retuns the name for the function that this frame represents. Inlined stack frame might have a concrete function that differs from the name of the inlined function (a named lldb.SBBlock).''')
3965
3966 __swig_getmethods__["line_entry"] = GetLineEntry
3967 if _newclass: line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line table entry (lldb.SBLineEntry) for this stack frame.''')
3968
3969 __swig_getmethods__["thread"] = GetThread
3970 if _newclass: thread = property(GetThread, None, doc='''A read only property that returns an lldb object that represents the thread (lldb.SBThread) for this stack frame.''')
3971
3972 __swig_getmethods__["disassembly"] = Disassemble
3973 if _newclass: disassembly = property(Disassemble, None, doc='''A read only property that returns the disassembly for this stack frame as a python string.''')
3974
3975 __swig_getmethods__["idx"] = GetFrameID
3976 if _newclass: idx = property(GetFrameID, None, doc='''A read only property that returns the zero based stack frame index.''')
3977
3978 __swig_getmethods__["variables"] = get_all_variables
3979 if _newclass: variables = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
3980
3981 __swig_getmethods__["vars"] = get_all_variables
3982 if _newclass: vars = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
3983
3984 __swig_getmethods__["locals"] = get_locals
3985 if _newclass: locals = property(get_locals, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the local variables in this stack frame.''')
3986
3987 __swig_getmethods__["args"] = get_arguments
3988 if _newclass: args = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
3989
3990 __swig_getmethods__["arguments"] = get_arguments
3991 if _newclass: arguments = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
3992
3993 __swig_getmethods__["statics"] = get_statics
3994 if _newclass: statics = property(get_statics, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the static variables in this stack frame.''')
3995
3996 __swig_getmethods__["registers"] = GetRegisters
3997 if _newclass: registers = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
3998
3999 __swig_getmethods__["regs"] = GetRegisters
4000 if _newclass: regs = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
4001
4002
4004 """__str__(SBFrame self) -> PyObject *"""
4005 return _lldb.SBFrame___str__(self)
4006
4007 SBFrame_swigregister = _lldb.SBFrame_swigregister
4008 SBFrame_swigregister(SBFrame)
4011 """
4012 Represents a generic function, which can be inlined or not.
4013
4014 For example (from test/lldbutil.py, but slightly modified for doc purpose),
4015
4016 ...
4017
4018 frame = thread.GetFrameAtIndex(i)
4019 addr = frame.GetPCAddress()
4020 load_addr = addr.GetLoadAddress(target)
4021 function = frame.GetFunction()
4022 mod_name = frame.GetModule().GetFileSpec().GetFilename()
4023
4024 if not function:
4025 # No debug info for 'function'.
4026 symbol = frame.GetSymbol()
4027 file_addr = addr.GetFileAddress()
4028 start_addr = symbol.GetStartAddress().GetFileAddress()
4029 symbol_name = symbol.GetName()
4030 symbol_offset = file_addr - start_addr
4031 print >> output, ' frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
4032 num=i, addr=load_addr, mod=mod_name, symbol=symbol_name, offset=symbol_offset)
4033 else:
4034 # Debug info is available for 'function'.
4035 func_name = frame.GetFunctionName()
4036 file_name = frame.GetLineEntry().GetFileSpec().GetFilename()
4037 line_num = frame.GetLineEntry().GetLine()
4038 print >> output, ' frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
4039 num=i, addr=load_addr, mod=mod_name,
4040 func='%s [inlined]' % func_name] if frame.IsInlined() else func_name,
4041 file=file_name, line=line_num, args=get_args_as_string(frame, showFuncName=False))
4042
4043 ...
4044
4045 """
4046 __swig_setmethods__ = {}
4047 __setattr__ = lambda self, name, value: _swig_setattr(self, SBFunction, name, value)
4048 __swig_getmethods__ = {}
4049 __getattr__ = lambda self, name: _swig_getattr(self, SBFunction, name)
4050 __repr__ = _swig_repr
4052 """
4053 __init__(lldb::SBFunction self) -> SBFunction
4054 __init__(lldb::SBFunction self, SBFunction rhs) -> SBFunction
4055 """
4056 this = _lldb.new_SBFunction(*args)
4057 try: self.this.append(this)
4058 except: self.this = this
4059 __swig_destroy__ = _lldb.delete_SBFunction
4060 __del__ = lambda self : None;
4065
4067 """GetName(SBFunction self) -> str const *"""
4068 return _lldb.SBFunction_GetName(self)
4069
4073
4075 """
4076 GetInstructions(SBFunction self, SBTarget target) -> SBInstructionList
4077 GetInstructions(SBFunction self, SBTarget target, str const * flavor) -> SBInstructionList
4078 """
4079 return _lldb.SBFunction_GetInstructions(self, *args)
4080
4084
4088
4092
4096
4100
4104
4106 """__eq__(SBFunction self, SBFunction rhs) -> bool"""
4107 return _lldb.SBFunction___eq__(self, *args)
4108
4110 """__ne__(SBFunction self, SBFunction rhs) -> bool"""
4111 return _lldb.SBFunction___ne__(self, *args)
4112
4115
4116 __swig_getmethods__["addr"] = GetStartAddress
4117 if _newclass: addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this function.''')
4118
4119 __swig_getmethods__["end_addr"] = GetEndAddress
4120 if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this function.''')
4121
4122 __swig_getmethods__["block"] = GetBlock
4123 if _newclass: block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the top level lexical block (lldb.SBBlock) for this function.''')
4124
4125 __swig_getmethods__["instructions"] = get_instructions_from_current_target
4126 if _newclass: instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this function.''')
4127
4128 __swig_getmethods__["mangled"] = GetMangledName
4129 if _newclass: mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this function as a string.''')
4130
4131 __swig_getmethods__["name"] = GetName
4132 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this function as a string.''')
4133
4134 __swig_getmethods__["prologue_size"] = GetPrologueByteSize
4135 if _newclass: prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
4136
4137 __swig_getmethods__["type"] = GetType
4138 if _newclass: type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the return type (lldb.SBType) for this function.''')
4139
4141 """__str__(SBFunction self) -> PyObject *"""
4142 return _lldb.SBFunction___str__(self)
4143
4145 if not isinstance(rhs, type(self)):
4146 return False
4147
4148 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
4149
4151 if not isinstance(rhs, type(self)):
4152 return True
4153
4154 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
4155
4156 SBFunction_swigregister = _lldb.SBFunction_swigregister
4157 SBFunction_swigregister(SBFunction)
4160 """Proxy of C++ lldb::SBHostOS class"""
4161 __swig_setmethods__ = {}
4162 __setattr__ = lambda self, name, value: _swig_setattr(self, SBHostOS, name, value)
4163 __swig_getmethods__ = {}
4164 __getattr__ = lambda self, name: _swig_getattr(self, SBHostOS, name)
4165 __repr__ = _swig_repr
4169
4170 if _newclass:GetProgramFileSpec = staticmethod(GetProgramFileSpec)
4171 __swig_getmethods__["GetProgramFileSpec"] = lambda x: GetProgramFileSpec
4175
4176 if _newclass:ThreadCreated = staticmethod(ThreadCreated)
4177 __swig_getmethods__["ThreadCreated"] = lambda x: ThreadCreated
4179 """ThreadCreate(str const * name, void *(*)(void *) thread_function, void * thread_arg, SBError err) -> lldb::thread_t"""
4180 return _lldb.SBHostOS_ThreadCreate(*args)
4181
4182 if _newclass:ThreadCreate = staticmethod(ThreadCreate)
4183 __swig_getmethods__["ThreadCreate"] = lambda x: ThreadCreate
4187
4188 if _newclass:ThreadCancel = staticmethod(ThreadCancel)
4189 __swig_getmethods__["ThreadCancel"] = lambda x: ThreadCancel
4193
4194 if _newclass:ThreadDetach = staticmethod(ThreadDetach)
4195 __swig_getmethods__["ThreadDetach"] = lambda x: ThreadDetach
4197 """ThreadJoin(lldb::thread_t thread, void ** result, SBError err) -> bool"""
4198 return _lldb.SBHostOS_ThreadJoin(*args)
4199
4200 if _newclass:ThreadJoin = staticmethod(ThreadJoin)
4201 __swig_getmethods__["ThreadJoin"] = lambda x: ThreadJoin
4203 """__init__(lldb::SBHostOS self) -> SBHostOS"""
4204 this = _lldb.new_SBHostOS()
4205 try: self.this.append(this)
4206 except: self.this = this
4207 __swig_destroy__ = _lldb.delete_SBHostOS
4208 __del__ = lambda self : None;
4209 SBHostOS_swigregister = _lldb.SBHostOS_swigregister
4210 SBHostOS_swigregister(SBHostOS)
4215
4219
4221 """SBHostOS_ThreadCreate(str const * name, void *(*)(void *) thread_function, void * thread_arg, SBError err) -> lldb::thread_t"""
4222 return _lldb.SBHostOS_ThreadCreate(*args)
4223
4227
4231
4233 """SBHostOS_ThreadJoin(lldb::thread_t thread, void ** result, SBError err) -> bool"""
4234 return _lldb.SBHostOS_ThreadJoin(*args)
4235
4251 __swig_destroy__ = _lldb.delete_SBInputReader
4252 __del__ = lambda self : None;
4259
4264
4268
4272
4276
4280
4281 SBInputReader_swigregister = _lldb.SBInputReader_swigregister
4282 SBInputReader_swigregister(SBInputReader)
4299 __swig_destroy__ = _lldb.delete_SBInstruction
4300 __del__ = lambda self : None;
4305
4309
4313
4317
4321
4325
4329
4333
4337
4338 - def Print(self, *args):
4341
4345
4349
4353
4355 """TestEmulation(SBInstruction self, SBStream output_stream, str const * test_file) -> bool"""
4356 return _lldb.SBInstruction_TestEmulation(self, *args)
4357
4368
4369 __swig_getmethods__["mnemonic"] = __mnemonic_property__
4370 if _newclass: mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
4371
4372 __swig_getmethods__["operands"] = __operands_property__
4373 if _newclass: operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
4374
4375 __swig_getmethods__["comment"] = __comment_property__
4376 if _newclass: comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
4377
4378 __swig_getmethods__["addr"] = GetAddress
4379 if _newclass: addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
4380
4381 __swig_getmethods__["size"] = GetByteSize
4382 if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
4383
4384 __swig_getmethods__["is_branch"] = DoesBranch
4385 if _newclass: is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
4386
4390
4391 SBInstruction_swigregister = _lldb.SBInstruction_swigregister
4392 SBInstruction_swigregister(SBInstruction)
4395 """
4396 Represents a list of machine instructions. SBFunction and SBSymbol have
4397 GetInstructions() methods which return SBInstructionList instances.
4398
4399 SBInstructionList supports instruction (SBInstruction instance) iteration.
4400 For example (see also SBDebugger for a more complete example),
4401
4402 def disassemble_instructions (insts):
4403 for i in insts:
4404 print i
4405
4406 defines a function which takes an SBInstructionList instance and prints out
4407 the machine instructions in assembly format.
4408 """
4409 __swig_setmethods__ = {}
4410 __setattr__ = lambda self, name, value: _swig_setattr(self, SBInstructionList, name, value)
4411 __swig_getmethods__ = {}
4412 __getattr__ = lambda self, name: _swig_getattr(self, SBInstructionList, name)
4413 __repr__ = _swig_repr
4417 """
4418 __init__(lldb::SBInstructionList self) -> SBInstructionList
4419 __init__(lldb::SBInstructionList self, SBInstructionList rhs) -> SBInstructionList
4420 """
4421 this = _lldb.new_SBInstructionList(*args)
4422 try: self.this.append(this)
4423 except: self.this = this
4424 __swig_destroy__ = _lldb.delete_SBInstructionList
4425 __del__ = lambda self : None;
4430
4434
4438
4442
4446
4447 - def Print(self, *args):
4450
4454
4458
4460 '''Access len of the instruction list.'''
4461 return int(self.GetSize())
4462
4464 '''Access instructions by integer index for array access or by lldb.SBAddress to find an instruction that matches a section offset address object.'''
4465 if type(key) is int:
4466
4467 if key < len(self):
4468 return self.GetInstructionAtIndex(key)
4469 elif type(key) is SBAddress:
4470
4471 lookup_file_addr = key.file_addr
4472 closest_inst = None
4473 for idx in range(self.GetSize()):
4474 inst = self.GetInstructionAtIndex(idx)
4475 inst_file_addr = inst.addr.file_addr
4476 if inst_file_addr == lookup_file_addr:
4477 return inst
4478 elif inst_file_addr > lookup_file_addr:
4479 return closest_inst
4480 else:
4481 closest_inst = inst
4482 return None
4483
4487
4488 SBInstructionList_swigregister = _lldb.SBInstructionList_swigregister
4489 SBInstructionList_swigregister(SBInstructionList)
4490
4491 -class SBLineEntry(_object):
4492 """
4493 Specifies an association with a contiguous range of instructions and
4494 a source file location. SBCompileUnit contains SBLineEntry(s). For example,
4495
4496 for lineEntry in compileUnit:
4497 print 'line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
4498 lineEntry.GetLine())
4499 print 'start addr: %s' % str(lineEntry.GetStartAddress())
4500 print 'end addr: %s' % str(lineEntry.GetEndAddress())
4501
4502 produces:
4503
4504 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
4505 start addr: a.out[0x100000d98]
4506 end addr: a.out[0x100000da3]
4507 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
4508 start addr: a.out[0x100000da3]
4509 end addr: a.out[0x100000da9]
4510 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
4511 start addr: a.out[0x100000da9]
4512 end addr: a.out[0x100000db6]
4513 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
4514 start addr: a.out[0x100000db6]
4515 end addr: a.out[0x100000dbc]
4516 ...
4517
4518 See also SBCompileUnit.
4519 """
4520 __swig_setmethods__ = {}
4521 __setattr__ = lambda self, name, value: _swig_setattr(self, SBLineEntry, name, value)
4522 __swig_getmethods__ = {}
4523 __getattr__ = lambda self, name: _swig_getattr(self, SBLineEntry, name)
4524 __repr__ = _swig_repr
4525 - def __init__(self, *args):
4526 """
4527 __init__(lldb::SBLineEntry self) -> SBLineEntry
4528 __init__(lldb::SBLineEntry self, SBLineEntry rhs) -> SBLineEntry
4529 """
4530 this = _lldb.new_SBLineEntry(*args)
4531 try: self.this.append(this)
4532 except: self.this = this
4533 __swig_destroy__ = _lldb.delete_SBLineEntry
4534 __del__ = lambda self : None;
4535 - def GetStartAddress(self):
4536 """GetStartAddress(SBLineEntry self) -> SBAddress"""
4537 return _lldb.SBLineEntry_GetStartAddress(self)
4538
4539 - def GetEndAddress(self):
4540 """GetEndAddress(SBLineEntry self) -> SBAddress"""
4541 return _lldb.SBLineEntry_GetEndAddress(self)
4542
4543 - def __nonzero__(self): return self.IsValid()
4544 - def IsValid(self):
4545 """IsValid(SBLineEntry self) -> bool"""
4546 return _lldb.SBLineEntry_IsValid(self)
4547
4548 - def GetFileSpec(self):
4549 """GetFileSpec(SBLineEntry self) -> SBFileSpec"""
4550 return _lldb.SBLineEntry_GetFileSpec(self)
4551
4552 - def GetLine(self):
4553 """GetLine(SBLineEntry self) -> uint32_t"""
4554 return _lldb.SBLineEntry_GetLine(self)
4555
4556 - def GetColumn(self):
4557 """GetColumn(SBLineEntry self) -> uint32_t"""
4558 return _lldb.SBLineEntry_GetColumn(self)
4559
4560 - def GetDescription(self, *args):
4561 """GetDescription(SBLineEntry self, SBStream description) -> bool"""
4562 return _lldb.SBLineEntry_GetDescription(self, *args)
4563
4564 - def SetFileSpec(self, *args):
4565 """SetFileSpec(SBLineEntry self, SBFileSpec filespec)"""
4566 return _lldb.SBLineEntry_SetFileSpec(self, *args)
4567
4568 - def SetLine(self, *args):
4569 """SetLine(SBLineEntry self, uint32_t line)"""
4570 return _lldb.SBLineEntry_SetLine(self, *args)
4571
4572 - def SetColumn(self, *args):
4573 """SetColumn(SBLineEntry self, uint32_t column)"""
4574 return _lldb.SBLineEntry_SetColumn(self, *args)
4575
4576 - def __eq__(self, *args):
4577 """__eq__(SBLineEntry self, SBLineEntry rhs) -> bool"""
4578 return _lldb.SBLineEntry___eq__(self, *args)
4579
4580 - def __ne__(self, *args):
4581 """__ne__(SBLineEntry self, SBLineEntry rhs) -> bool"""
4582 return _lldb.SBLineEntry___ne__(self, *args)
4583
4584 __swig_getmethods__["file"] = GetFileSpec
4585 if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
4586
4587 __swig_getmethods__["line"] = GetLine
4588 if _newclass: ling = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
4589
4590 __swig_getmethods__["column"] = GetColumn
4591 if _newclass: column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
4592
4593 __swig_getmethods__["addr"] = GetStartAddress
4594 if _newclass: addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
4595
4596 __swig_getmethods__["end_addr"] = GetEndAddress
4597 if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
4598
4599
4600 - def __str__(self):
4601 """__str__(SBLineEntry self) -> PyObject *"""
4602 return _lldb.SBLineEntry___str__(self)
4603
4604 - def __eq__(self, rhs):
4605 if not isinstance(rhs, type(self)):
4606 return False
4607
4608 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
4609
4610 - def __ne__(self, rhs):
4611 if not isinstance(rhs, type(self)):
4612 return True
4613
4614 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
4615
4616 SBLineEntry_swigregister = _lldb.SBLineEntry_swigregister
4617 SBLineEntry_swigregister(SBLineEntry)
4620 """
4621 API clients can register its own listener to debugger events.
4622
4623 See aslo SBEvent for example usage of creating and adding a listener.
4624 """
4625 __swig_setmethods__ = {}
4626 __setattr__ = lambda self, name, value: _swig_setattr(self, SBListener, name, value)
4627 __swig_getmethods__ = {}
4628 __getattr__ = lambda self, name: _swig_getattr(self, SBListener, name)
4629 __repr__ = _swig_repr
4631 """
4632 __init__(lldb::SBListener self) -> SBListener
4633 __init__(lldb::SBListener self, str const * name) -> SBListener
4634 __init__(lldb::SBListener self, SBListener rhs) -> SBListener
4635 """
4636 this = _lldb.new_SBListener(*args)
4637 try: self.this.append(this)
4638 except: self.this = this
4639 __swig_destroy__ = _lldb.delete_SBListener
4640 __del__ = lambda self : None;
4644
4648
4653
4655 """StartListeningForEventClass(SBListener self, SBDebugger debugger, str const * broadcaster_class, uint32_t event_mask) -> uint32_t"""
4656 return _lldb.SBListener_StartListeningForEventClass(self, *args)
4657
4659 """StopListeningForEventClass(SBListener self, SBDebugger debugger, str const * broadcaster_class, uint32_t event_mask) -> uint32_t"""
4660 return _lldb.SBListener_StopListeningForEventClass(self, *args)
4661
4665
4669
4671 """WaitForEvent(SBListener self, uint32_t num_seconds, SBEvent event) -> bool"""
4672 return _lldb.SBListener_WaitForEvent(self, *args)
4673
4677
4681
4685
4689
4693
4697
4701
4705
4709
4710 SBListener_swigregister = _lldb.SBListener_swigregister
4711 SBListener_swigregister(SBListener)
4714 """
4715 Represents an executable image and its associated object and symbol files.
4716
4717 The module is designed to be able to select a single slice of an
4718 executable image as it would appear on disk and during program
4719 execution.
4720
4721 You can retrieve SBModule from SBSymbolContext, which in turn is available
4722 from SBFrame.
4723
4724 SBModule supports symbol iteration, for example,
4725
4726 for symbol in module:
4727 name = symbol.GetName()
4728 saddr = symbol.GetStartAddress()
4729 eaddr = symbol.GetEndAddress()
4730
4731 and rich comparion methods which allow the API program to use,
4732
4733 if thisModule == thatModule:
4734 print 'This module is the same as that module'
4735
4736 to test module equality. A module also contains object file sections, namely
4737 SBSection. SBModule supports section iteration through section_iter(), for
4738 example,
4739
4740 print 'Number of sections: %d' % module.GetNumSections()
4741 for sec in module.section_iter():
4742 print sec
4743
4744 And to iterate the symbols within a SBSection, use symbol_in_section_iter(),
4745
4746 # Iterates the text section and prints each symbols within each sub-section.
4747 for subsec in text_sec:
4748 print INDENT + repr(subsec)
4749 for sym in exe_module.symbol_in_section_iter(subsec):
4750 print INDENT2 + repr(sym)
4751 print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType())
4752
4753 produces this following output:
4754
4755 [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
4756 id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
4757 symbol type: code
4758 id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0)
4759 symbol type: code
4760 id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c)
4761 symbol type: code
4762 id = {0x00000023}, name = 'start', address = 0x0000000100001780
4763 symbol type: code
4764 [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
4765 id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62)
4766 symbol type: trampoline
4767 id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68)
4768 symbol type: trampoline
4769 id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e)
4770 symbol type: trampoline
4771 id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74)
4772 symbol type: trampoline
4773 id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a)
4774 symbol type: trampoline
4775 id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80)
4776 symbol type: trampoline
4777 id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86)
4778 symbol type: trampoline
4779 id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c)
4780 symbol type: trampoline
4781 id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92)
4782 symbol type: trampoline
4783 id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98)
4784 symbol type: trampoline
4785 id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e)
4786 symbol type: trampoline
4787 id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4)
4788 symbol type: trampoline
4789 [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
4790 [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
4791 [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
4792 [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
4793
4794 """
4795 __swig_setmethods__ = {}
4796 __setattr__ = lambda self, name, value: _swig_setattr(self, SBModule, name, value)
4797 __swig_getmethods__ = {}
4798 __getattr__ = lambda self, name: _swig_getattr(self, SBModule, name)
4799 __repr__ = _swig_repr
4806
4808 """Given a module and its contained section, returns an iterator on the
4809 symbols within the section."""
4810 for sym in self:
4811 if in_range(sym, section):
4812 yield sym
4813
4815 """
4816 __init__(lldb::SBModule self) -> SBModule
4817 __init__(lldb::SBModule self, SBModule rhs) -> SBModule
4818 __init__(lldb::SBModule self, SBModuleSpec module_spec) -> SBModule
4819 __init__(lldb::SBModule self, SBProcess process, lldb::addr_t header_addr) -> SBModule
4820 """
4821 this = _lldb.new_SBModule(*args)
4822 try: self.this.append(this)
4823 except: self.this = this
4824 __swig_destroy__ = _lldb.delete_SBModule
4825 __del__ = lambda self : None;
4828 """IsValid(SBModule self) -> bool"""
4829 return _lldb.SBModule_IsValid(self)
4830
4832 """Clear(SBModule self)"""
4833 return _lldb.SBModule_Clear(self)
4834
4836 """
4837 GetFileSpec(SBModule self) -> SBFileSpec
4838
4839 Get const accessor for the module file specification.
4840
4841 This function returns the file for the module on the host system
4842 that is running LLDB. This can differ from the path on the
4843 platform since we might be doing remote debugging.
4844
4845 @return
4846 A const reference to the file specification object.
4847 """
4848 return _lldb.SBModule_GetFileSpec(self)
4849
4869
4873
4875 """
4876 GetUUIDString(SBModule self) -> str const *
4877
4878 Returns the UUID of the module as a Python string.
4879 """
4880 return _lldb.SBModule_GetUUIDString(self)
4881
4883 """FindSection(SBModule self, str const * sect_name) -> SBSection"""
4884 return _lldb.SBModule_FindSection(self, *args)
4885
4889
4891 """ResolveSymbolContextForAddress(SBModule self, SBAddress addr, uint32_t resolve_scope) -> SBSymbolContext"""
4892 return _lldb.SBModule_ResolveSymbolContextForAddress(self, *args)
4893
4897
4901
4905
4909
4913
4915 """
4916 FindSymbol(SBModule self, str const * name, lldb::SymbolType type=eSymbolTypeAny) -> SBSymbol
4917 FindSymbol(SBModule self, str const * name) -> SBSymbol
4918 """
4919 return _lldb.SBModule_FindSymbol(self, *args)
4920
4922 """
4923 FindSymbols(SBModule self, str const * name, lldb::SymbolType type=eSymbolTypeAny) -> SBSymbolContextList
4924 FindSymbols(SBModule self, str const * name) -> SBSymbolContextList
4925 """
4926 return _lldb.SBModule_FindSymbols(self, *args)
4927
4931
4935
4937 """
4938 FindFunctions(SBModule self, str const * name, uint32_t name_type_mask=eFunctionNameTypeAny) -> SBSymbolContextList
4939 FindFunctions(SBModule self, str const * name) -> SBSymbolContextList
4940
4941 Find functions by name.
4942
4943 @param[in] name
4944 The name of the function we are looking for.
4945
4946 @param[in] name_type_mask
4947 A logical OR of one or more FunctionNameType enum bits that
4948 indicate what kind of names should be used when doing the
4949 lookup. Bits include fully qualified names, base names,
4950 C++ methods, or ObjC selectors.
4951 See FunctionNameType for more details.
4952
4953 @return
4954 A symbol context list that gets filled in with all of the
4955 matches.
4956 """
4957 return _lldb.SBModule_FindFunctions(self, *args)
4958
4962
4964 """FindTypes(SBModule self, str const * type) -> SBTypeList"""
4965 return _lldb.SBModule_FindTypes(self, *args)
4966
4970
4972 """
4973 GetTypes(SBModule self, uint32_t type_mask=eTypeClassAny) -> SBTypeList
4974 GetTypes(SBModule self) -> SBTypeList
4975
4976 Get all types matching type_mask from debug info in this
4977 module.
4978
4979 @param[in] type_mask
4980 A bitfield that consists of one or more bits logically OR'ed
4981 together from the lldb::TypeClass enumeration. This allows
4982 you to request only structure types, or only class, struct
4983 and union types. Passing in lldb::eTypeClassAny will return
4984 all types found in the debug information for this module.
4985
4986 @return
4987 A list of types in this module that match type_mask
4988 """
4989 return _lldb.SBModule_GetTypes(self, *args)
4990
4992 """
4993 FindGlobalVariables(SBModule self, SBTarget target, str const * name, uint32_t max_matches) -> SBValueList
4994
4995 Find global and static variables by name.
4996
4997 @param[in] target
4998 A valid SBTarget instance representing the debuggee.
4999
5000 @param[in] name
5001 The name of the global or static variable we are looking
5002 for.
5003
5004 @param[in] max_matches
5005 Allow the number of matches to be limited to max_matches.
5006
5007 @return
5008 A list of matched variables in an SBValueList.
5009 """
5010 return _lldb.SBModule_FindGlobalVariables(self, *args)
5011
5013 """
5014 FindFirstGlobalVariable(SBModule self, SBTarget target, str const * name) -> SBValue
5015
5016 Find the first global (or static) variable by name.
5017
5018 @param[in] target
5019 A valid SBTarget instance representing the debuggee.
5020
5021 @param[in] name
5022 The name of the global or static variable we are looking
5023 for.
5024
5025 @return
5026 An SBValue that gets filled in with the found variable (if any).
5027 """
5028 return _lldb.SBModule_FindFirstGlobalVariable(self, *args)
5029
5033
5037
5039 """GetTriple(SBModule self) -> str const *"""
5040 return _lldb.SBModule_GetTriple(self)
5041
5045
5047 """__eq__(SBModule self, SBModule rhs) -> bool"""
5048 return _lldb.SBModule___eq__(self, *args)
5049
5051 """__ne__(SBModule self, SBModule rhs) -> bool"""
5052 return _lldb.SBModule___ne__(self, *args)
5053
5055 re_compile_type = type(re.compile('.'))
5056 '''A helper object that will lazily hand out lldb.SBSymbol objects for a module when supplied an index, name, or regular expression.'''
5058 self.sbmodule = sbmodule
5059
5061 if self.sbmodule:
5062 return int(self.sbmodule.GetNumSymbols())
5063 return 0
5064
5099
5101 '''An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.'''
5102 return self.symbols_access (self)
5103
5105 '''An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.'''
5106 return self.compile_units_access (self)
5107
5114
5116 re_compile_type = type(re.compile('.'))
5117 '''A helper object that will lazily hand out lldb.SBSection objects for a module when supplied an index, name, or regular expression.'''
5119 self.sbmodule = sbmodule
5120
5122 if self.sbmodule:
5123 return int(self.sbmodule.GetNumSections())
5124 return 0
5125
5149
5151 re_compile_type = type(re.compile('.'))
5152 '''A helper object that will lazily hand out lldb.SBCompileUnit objects for a module when supplied an index, full or partial path, or regular expression.'''
5154 self.sbmodule = sbmodule
5155
5160
5189
5191 '''An accessor function that returns a sections_access() object which allows lazy section array access.'''
5192 return self.sections_access (self)
5193
5195 '''An accessor function that returns an array object that contains all sections in this module object.'''
5196 if not hasattr(self, 'sections_array'):
5197 self.sections_array = []
5198 for idx in range(self.num_sections):
5199 self.sections_array.append(self.GetSectionAtIndex(idx))
5200 return self.sections_array
5201
5203 '''An accessor function that returns an array object that contains all compile_units in this module object.'''
5204 if not hasattr(self, 'compile_units_array'):
5205 self.compile_units_array = []
5206 for idx in range(self.GetNumCompileUnits()):
5207 self.compile_units_array.append(self.GetCompileUnitAtIndex(idx))
5208 return self.compile_units_array
5209
5210 __swig_getmethods__["symbols"] = get_symbols_array
5211 if _newclass: symbols = property(get_symbols_array, None, doc='''A read only property that returns a list() of lldb.SBSymbol objects contained in this module.''')
5212
5213 __swig_getmethods__["symbol"] = get_symbols_access_object
5214 if _newclass: symbol = property(get_symbols_access_object, None, doc='''A read only property that can be used to access symbols by index ("symbol = module.symbol[0]"), name ("symbols = module.symbol['main']"), or using a regular expression ("symbols = module.symbol[re.compile(...)]"). The return value is a single lldb.SBSymbol object for array access, and a list() of lldb.SBSymbol objects for name and regular expression access''')
5215
5216 __swig_getmethods__["sections"] = get_sections_array
5217 if _newclass: sections = property(get_sections_array, None, doc='''A read only property that returns a list() of lldb.SBSection objects contained in this module.''')
5218
5219 __swig_getmethods__["compile_units"] = get_compile_units_array
5220 if _newclass: compile_units = property(get_compile_units_array, None, doc='''A read only property that returns a list() of lldb.SBCompileUnit objects contained in this module.''')
5221
5222 __swig_getmethods__["section"] = get_sections_access_object
5223 if _newclass: section = property(get_sections_access_object, None, doc='''A read only property that can be used to access symbols by index ("section = module.section[0]"), name ("sections = module.section[\'main\']"), or using a regular expression ("sections = module.section[re.compile(...)]"). The return value is a single lldb.SBSection object for array access, and a list() of lldb.SBSection objects for name and regular expression access''')
5224
5225 __swig_getmethods__["compile_unit"] = get_compile_units_access_object
5226 if _newclass: section = property(get_sections_access_object, None, doc='''A read only property that can be used to access compile units by index ("compile_unit = module.compile_unit[0]"), name ("compile_unit = module.compile_unit[\'main.cpp\']"), or using a regular expression ("compile_unit = module.compile_unit[re.compile(...)]"). The return value is a single lldb.SBCompileUnit object for array access or by full or partial path, and a list() of lldb.SBCompileUnit objects regular expressions.''')
5227
5230
5231 __swig_getmethods__["uuid"] = get_uuid
5232 if _newclass: uuid = property(get_uuid, None, doc='''A read only property that returns a standard python uuid.UUID object that represents the UUID of this module.''')
5233
5234 __swig_getmethods__["file"] = GetFileSpec
5235 if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented where it is being debugged.''')
5236
5237 __swig_getmethods__["platform_file"] = GetPlatformFileSpec
5238 if _newclass: platform_file = property(GetPlatformFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented on the current host system.''')
5239
5240 __swig_getmethods__["byte_order"] = GetByteOrder
5241 if _newclass: byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this module.''')
5242
5243 __swig_getmethods__["addr_size"] = GetAddressByteSize
5244 if _newclass: addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this module.''')
5245
5246 __swig_getmethods__["triple"] = GetTriple
5247 if _newclass: triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this module.''')
5248
5249 __swig_getmethods__["num_symbols"] = GetNumSymbols
5250 if _newclass: num_symbols = property(GetNumSymbols, None, doc='''A read only property that returns number of symbols in the module symbol table as an integer.''')
5251
5252 __swig_getmethods__["num_sections"] = GetNumSections
5253 if _newclass: num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''')
5254
5255
5257 """__str__(SBModule self) -> PyObject *"""
5258 return _lldb.SBModule___str__(self)
5259
5261 if not isinstance(rhs, type(self)):
5262 return False
5263
5264 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
5265
5267 if not isinstance(rhs, type(self)):
5268 return True
5269
5270 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
5271
5272 SBModule_swigregister = _lldb.SBModule_swigregister
5273 SBModule_swigregister(SBModule)
5290 __swig_destroy__ = _lldb.delete_SBModuleSpec
5291 __del__ = lambda self : None;
5296
5300
5304
5308
5312
5316
5320
5324
5328
5332
5336
5340
5344
5348
5350 """SetUUIDBytes(SBModuleSpec self, uint8_t const * uuid, size_t uuid_len) -> bool"""
5351 return _lldb.SBModuleSpec_SetUUIDBytes(self, *args)
5352
5356
5360
5361 SBModuleSpec_swigregister = _lldb.SBModuleSpec_swigregister
5362 SBModuleSpec_swigregister(SBModuleSpec)
5379 __swig_destroy__ = _lldb.delete_SBModuleSpecList
5380 __del__ = lambda self : None;
5384
5385 if _newclass:GetModuleSpecifications = staticmethod(GetModuleSpecifications)
5386 __swig_getmethods__["GetModuleSpecifications"] = lambda x: GetModuleSpecifications
5388 """
5389 Append(SBModuleSpecList self, SBModuleSpec spec)
5390 Append(SBModuleSpecList self, SBModuleSpecList spec_list)
5391 """
5392 return _lldb.SBModuleSpecList_Append(self, *args)
5393
5397
5401
5405
5409
5413
5417
5418 SBModuleSpecList_swigregister = _lldb.SBModuleSpecList_swigregister
5419 SBModuleSpecList_swigregister(SBModuleSpecList)
5424
5426 """
5427 Represents the process associated with the target program.
5428
5429 SBProcess supports thread iteration. For example (from test/lldbutil.py),
5430
5431 # ==================================================
5432 # Utility functions related to Threads and Processes
5433 # ==================================================
5434
5435 def get_stopped_threads(process, reason):
5436 '''Returns the thread(s) with the specified stop reason in a list.
5437
5438 The list can be empty if no such thread exists.
5439 '''
5440 threads = []
5441 for t in process:
5442 if t.GetStopReason() == reason:
5443 threads.append(t)
5444 return threads
5445
5446 ...
5447
5448 """
5449 __swig_setmethods__ = {}
5450 __setattr__ = lambda self, name, value: _swig_setattr(self, SBProcess, name, value)
5451 __swig_getmethods__ = {}
5452 __getattr__ = lambda self, name: _swig_getattr(self, SBProcess, name)
5453 __repr__ = _swig_repr
5454 eBroadcastBitStateChanged = _lldb.SBProcess_eBroadcastBitStateChanged
5455 eBroadcastBitInterrupt = _lldb.SBProcess_eBroadcastBitInterrupt
5456 eBroadcastBitSTDOUT = _lldb.SBProcess_eBroadcastBitSTDOUT
5457 eBroadcastBitSTDERR = _lldb.SBProcess_eBroadcastBitSTDERR
5458 eBroadcastBitProfileData = _lldb.SBProcess_eBroadcastBitProfileData
5462 """
5463 __init__(lldb::SBProcess self) -> SBProcess
5464 __init__(lldb::SBProcess self, SBProcess rhs) -> SBProcess
5465 """
5466 this = _lldb.new_SBProcess(*args)
5467 try: self.this.append(this)
5468 except: self.this = this
5469 __swig_destroy__ = _lldb.delete_SBProcess
5470 __del__ = lambda self : None;
5474
5475 if _newclass:GetBroadcasterClassName = staticmethod(GetBroadcasterClassName)
5476 __swig_getmethods__["GetBroadcasterClassName"] = lambda x: GetBroadcasterClassName
5480
5484
5488
5493
5497
5501
5503 """
5504 Writes data into the current process's stdin. API client specifies a Python
5505 string as the only argument.
5506 """
5507 return _lldb.SBProcess_PutSTDIN(self, *args)
5508
5510 """
5511 Reads data from the current process's stdout stream. API client specifies
5512 the size of the buffer to read data into. It returns the byte buffer in a
5513 Python string.
5514 """
5515 return _lldb.SBProcess_GetSTDOUT(self, *args)
5516
5518 """
5519 Reads data from the current process's stderr stream. API client specifies
5520 the size of the buffer to read data into. It returns the byte buffer in a
5521 Python string.
5522 """
5523 return _lldb.SBProcess_GetSTDERR(self, *args)
5524
5528
5532
5536
5538 """
5539 RemoteAttachToProcessWithID(SBProcess self, lldb::pid_t pid, SBError error) -> bool
5540
5541 Remote connection related functions. These will fail if the
5542 process is not in eStateConnected. They are intended for use
5543 when connecting to an externally managed debugserver instance.
5544 """
5545 return _lldb.SBProcess_RemoteAttachToProcessWithID(self, *args)
5546
5548 """
5549 RemoteLaunch(SBProcess self, str const ** argv, str const ** envp, str const * stdin_path, str const * stdout_path,
5550 str const * stderr_path, str const * working_directory, uint32_t launch_flags,
5551 bool stop_at_entry, SBError error) -> bool
5552
5553 See SBTarget.Launch for argument description and usage.
5554 """
5555 return _lldb.SBProcess_RemoteLaunch(self, *args)
5556
5560
5562 """
5563 Returns the INDEX'th thread from the list of current threads. The index
5564 of a thread is only valid for the current stop. For a persistent thread
5565 identifier use either the thread ID or the IndexID. See help on SBThread
5566 for more details.
5567 """
5568 return _lldb.SBProcess_GetThreadAtIndex(self, *args)
5569
5575
5581
5587
5589 """
5590 Lazily create a thread on demand through the current OperatingSystem plug-in, if the current OperatingSystem plug-in supports it.
5591 """
5592 return _lldb.SBProcess_CreateOSPluginThread(self, *args)
5593
5597
5601
5605
5607 """GetState(SBProcess self) -> lldb::StateType"""
5608 return _lldb.SBProcess_GetState(self)
5609
5613
5617
5623
5625 """
5626 Returns an integer ID that is guaranteed to be unique across all process instances. This is not the process ID, just a unique integer for comparison and caching purposes.
5627 """
5628 return _lldb.SBProcess_GetUniqueID(self)
5629
5633
5635 """
5636 Destroy(SBProcess self) -> SBError
5637
5638 Kills the process and shuts down all threads that were spawned to
5639 track and monitor process.
5640 """
5641 return _lldb.SBProcess_Destroy(self)
5642
5646
5648 """Stop(SBProcess self) -> SBError"""
5649 return _lldb.SBProcess_Stop(self)
5650
5652 """Kill(SBProcess self) -> SBError"""
5653 return _lldb.SBProcess_Kill(self)
5654
5656 """Detach(SBProcess self) -> SBError"""
5657 return _lldb.SBProcess_Detach(self)
5658
5660 """
5661 Signal(SBProcess self, int signal) -> SBError
5662
5663 Sends the process a unix signal.
5664 """
5665 return _lldb.SBProcess_Signal(self, *args)
5666
5667 - def GetStopID(self, include_expression_stops=False):
5668 """
5669 GetStopID(SBProcess self, bool include_expression_stops=False) -> uint32_t
5670 GetStopID(SBProcess self) -> uint32_t
5671
5672 Returns a stop id that will increase every time the process executes. If
5673 include_expression_stops is true, then stops caused by expression evaluation
5674 will cause the returned value to increase, otherwise the counter returned will
5675 only increase when execution is continued explicitly by the user. Note, the value
5676 will always increase, but may increase by more than one per stop.
5677 """
5678 return _lldb.SBProcess_GetStopID(self, include_expression_stops)
5679
5683
5685 """
5686 Reads memory from the current process's address space and removes any
5687 traps that may have been inserted into the memory. It returns the byte
5688 buffer in a Python string. Example:
5689
5690 # Read 4 bytes from address 'addr' and assume error.Success() is True.
5691 content = process.ReadMemory(addr, 4, error)
5692 # Use 'ascii' encoding as each byte of 'content' is within [0..255].
5693 new_bytes = bytearray(content, 'ascii')
5694 """
5695 return _lldb.SBProcess_ReadMemory(self, *args)
5696
5698 """
5699 Writes memory to the current process's address space and maintains any
5700 traps that might be present due to software breakpoints. Example:
5701
5702 # Create a Python string from the byte array.
5703 new_value = str(bytes)
5704 result = process.WriteMemory(addr, new_value, error)
5705 if not error.Success() or result != len(bytes):
5706 print 'SBProcess.WriteMemory() failed!'
5707 """
5708 return _lldb.SBProcess_WriteMemory(self, *args)
5709
5711 """
5712 Reads a NULL terminated C string from the current process's address space.
5713 It returns a python string of the exact length, or truncates the string if
5714 the maximum stracter limit is reached. Example:
5715
5716 # Read a C string of at most 256 bytes from address '0x1000'
5717 error = lldb.SBError()
5718 cstring = process.ReadCStringFromMemory(0x1000, 256, error)
5719 if error.Success():
5720 print 'cstring: ', cstring
5721 else
5722 print 'error: ', error
5723 """
5724 return _lldb.SBProcess_ReadCStringFromMemory(self, *args)
5725
5727 """
5728 Reads an unsigned integer from memory given a byte size and an address.
5729 Returns the unsigned integer that was read. Example:
5730
5731 # Read a 4 byte unsigned integer from address 0x1000
5732 error = lldb.SBError()
5733 uint = ReadUnsignedFromMemory(0x1000, 4, error)
5734 if error.Success():
5735 print 'integer: %u' % uint
5736 else
5737 print 'error: ', error
5738
5739 """
5740 return _lldb.SBProcess_ReadUnsignedFromMemory(self, *args)
5741
5743 """
5744 Reads a pointer from memory from an address and returns the value. Example:
5745
5746 # Read a pointer from address 0x1000
5747 error = lldb.SBError()
5748 ptr = ReadPointerFromMemory(0x1000, error)
5749 if error.Success():
5750 print 'pointer: 0x%x' % ptr
5751 else
5752 print 'error: ', error
5753
5754 """
5755 return _lldb.SBProcess_ReadPointerFromMemory(self, *args)
5756
5760
5761 if _newclass:GetStateFromEvent = staticmethod(GetStateFromEvent)
5762 __swig_getmethods__["GetStateFromEvent"] = lambda x: GetStateFromEvent
5766
5767 if _newclass:GetRestartedFromEvent = staticmethod(GetRestartedFromEvent)
5768 __swig_getmethods__["GetRestartedFromEvent"] = lambda x: GetRestartedFromEvent
5772
5773 if _newclass:GetNumRestartedReasonsFromEvent = staticmethod(GetNumRestartedReasonsFromEvent)
5774 __swig_getmethods__["GetNumRestartedReasonsFromEvent"] = lambda x: GetNumRestartedReasonsFromEvent
5778
5779 if _newclass:GetRestartedReasonAtIndexFromEvent = staticmethod(GetRestartedReasonAtIndexFromEvent)
5780 __swig_getmethods__["GetRestartedReasonAtIndexFromEvent"] = lambda x: GetRestartedReasonAtIndexFromEvent
5784
5785 if _newclass:GetProcessFromEvent = staticmethod(GetProcessFromEvent)
5786 __swig_getmethods__["GetProcessFromEvent"] = lambda x: GetProcessFromEvent
5790
5791 if _newclass:EventIsProcessEvent = staticmethod(EventIsProcessEvent)
5792 __swig_getmethods__["EventIsProcessEvent"] = lambda x: EventIsProcessEvent
5796
5800
5804
5806 """LoadImage(SBProcess self, SBFileSpec image_spec, SBError error) -> uint32_t"""
5807 return _lldb.SBProcess_LoadImage(self, *args)
5808
5812
5825
5832
5839
5841 '''A helper object that will lazily hand out thread for a process when supplied an index.'''
5843 self.sbprocess = sbprocess
5844
5846 if self.sbprocess:
5847 return int(self.sbprocess.GetNumThreads())
5848 return 0
5849
5851 if type(key) is int and key < len(self):
5852 return self.sbprocess.GetThreadAtIndex(key)
5853 return None
5854
5856 '''An accessor function that returns a modules_access() object which allows lazy thread access from a lldb.SBProcess object.'''
5857 return self.threads_access (self)
5858
5866
5867 __swig_getmethods__["threads"] = get_process_thread_list
5868 if _newclass: threads = property(get_process_thread_list, None, doc='''A read only property that returns a list() of lldb.SBThread objects for this process.''')
5869
5870 __swig_getmethods__["thread"] = get_threads_access_object
5871 if _newclass: thread = property(get_threads_access_object, None, doc='''A read only property that returns an object that can access threads by thread index (thread = lldb.process.thread[12]).''')
5872
5873 __swig_getmethods__["is_alive"] = __get_is_alive__
5874 if _newclass: is_alive = property(__get_is_alive__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently alive.''')
5875
5876 __swig_getmethods__["is_running"] = __get_is_running__
5877 if _newclass: is_running = property(__get_is_running__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently running.''')
5878
5879 __swig_getmethods__["is_stopped"] = __get_is_running__
5880 if _newclass: is_stopped = property(__get_is_running__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently stopped.''')
5881
5882 __swig_getmethods__["id"] = GetProcessID
5883 if _newclass: id = property(GetProcessID, None, doc='''A read only property that returns the process ID as an integer.''')
5884
5885 __swig_getmethods__["target"] = GetTarget
5886 if _newclass: target = property(GetTarget, None, doc='''A read only property that an lldb object that represents the target (lldb.SBTarget) that owns this process.''')
5887
5888 __swig_getmethods__["num_threads"] = GetNumThreads
5889 if _newclass: num_threads = property(GetNumThreads, None, doc='''A read only property that returns the number of threads in this process as an integer.''')
5890
5891 __swig_getmethods__["selected_thread"] = GetSelectedThread
5892 __swig_setmethods__["selected_thread"] = SetSelectedThread
5893 if _newclass: selected_thread = property(GetSelectedThread, SetSelectedThread, doc='''A read/write property that gets/sets the currently selected thread in this process. The getter returns a lldb.SBThread object and the setter takes an lldb.SBThread object.''')
5894
5895 __swig_getmethods__["state"] = GetState
5896 if _newclass: state = property(GetState, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eState") that represents the current state of this process (running, stopped, exited, etc.).''')
5897
5898 __swig_getmethods__["exit_state"] = GetExitStatus
5899 if _newclass: exit_state = property(GetExitStatus, None, doc='''A read only property that returns an exit status as an integer of this process when the process state is lldb.eStateExited.''')
5900
5901 __swig_getmethods__["exit_description"] = GetExitDescription
5902 if _newclass: exit_description = property(GetExitDescription, None, doc='''A read only property that returns an exit description as a string of this process when the process state is lldb.eStateExited.''')
5903
5904 __swig_getmethods__["broadcaster"] = GetBroadcaster
5905 if _newclass: broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this process.''')
5906
5908 """__str__(SBProcess self) -> PyObject *"""
5909 return _lldb.SBProcess___str__(self)
5910
5911 SBProcess_swigregister = _lldb.SBProcess_swigregister
5912 SBProcess_swigregister(SBProcess)
5917
5921
5925
5929
5933
5937
5941
5943 """
5944 Represents an executable image section.
5945
5946 SBSection supports iteration through its subsection, represented as SBSection
5947 as well. For example,
5948
5949 for sec in exe_module:
5950 if sec.GetName() == '__TEXT':
5951 print sec
5952 break
5953 print INDENT + 'Number of subsections: %d' % sec.GetNumSubSections()
5954 for subsec in sec:
5955 print INDENT + repr(subsec)
5956
5957 produces:
5958
5959 [0x0000000100000000-0x0000000100002000) a.out.__TEXT
5960 Number of subsections: 6
5961 [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
5962 [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
5963 [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
5964 [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
5965 [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
5966 [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
5967
5968 See also SBModule.
5969 """
5970 __swig_setmethods__ = {}
5971 __setattr__ = lambda self, name, value: _swig_setattr(self, SBSection, name, value)
5972 __swig_getmethods__ = {}
5973 __getattr__ = lambda self, name: _swig_getattr(self, SBSection, name)
5974 __repr__ = _swig_repr
5975 - def __iter__(self): return lldb_iter(self, 'GetNumSubSections', 'GetSubSectionAtIndex')
5978 """
5979 __init__(lldb::SBSection self) -> SBSection
5980 __init__(lldb::SBSection self, SBSection rhs) -> SBSection
5981 """
5982 this = _lldb.new_SBSection(*args)
5983 try: self.this.append(this)
5984 except: self.this = this
5985 __swig_destroy__ = _lldb.delete_SBSection
5986 __del__ = lambda self : None;
5991
5993 """GetName(SBSection self) -> str const *"""
5994 return _lldb.SBSection_GetName(self)
5995
5999
6003
6007
6011
6015
6019
6023
6027
6031
6033 """
6034 GetSectionData(SBSection self) -> SBData
6035 GetSectionData(SBSection self, uint64_t offset, uint64_t size) -> SBData
6036 """
6037 return _lldb.SBSection_GetSectionData(self, *args)
6038
6042
6046
6048 """__eq__(SBSection self, SBSection rhs) -> bool"""
6049 return _lldb.SBSection___eq__(self, *args)
6050
6052 """__ne__(SBSection self, SBSection rhs) -> bool"""
6053 return _lldb.SBSection___ne__(self, *args)
6054
6057
6058 __swig_getmethods__["name"] = GetName
6059 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name of this section as a string.''')
6060
6061 __swig_getmethods__["addr"] = get_addr
6062 if _newclass: addr = property(get_addr, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this section.''')
6063
6064 __swig_getmethods__["file_addr"] = GetFileAddress
6065 if _newclass: file_addr = property(GetFileAddress, None, doc='''A read only property that returns an integer that represents the starting "file" address for this section, or the address of the section in the object file in which it is defined.''')
6066
6067 __swig_getmethods__["size"] = GetByteSize
6068 if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this section as an integer.''')
6069
6070 __swig_getmethods__["file_offset"] = GetFileOffset
6071 if _newclass: file_offset = property(GetFileOffset, None, doc='''A read only property that returns the file offset in bytes of this section as an integer.''')
6072
6073 __swig_getmethods__["file_size"] = GetFileByteSize
6074 if _newclass: file_size = property(GetFileByteSize, None, doc='''A read only property that returns the file size in bytes of this section as an integer.''')
6075
6076 __swig_getmethods__["data"] = GetSectionData
6077 if _newclass: data = property(GetSectionData, None, doc='''A read only property that returns an lldb object that represents the bytes for this section (lldb.SBData) for this section.''')
6078
6079 __swig_getmethods__["type"] = GetSectionType
6080 if _newclass: type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''')
6081
6082
6084 """__str__(SBSection self) -> PyObject *"""
6085 return _lldb.SBSection___str__(self)
6086
6088 if not isinstance(rhs, type(self)):
6089 return False
6090
6091 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
6092
6094 if not isinstance(rhs, type(self)):
6095 return True
6096
6097 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
6098
6099 SBSection_swigregister = _lldb.SBSection_swigregister
6100 SBSection_swigregister(SBSection)
6103 """
6104 Represents a central authority for displaying source code.
6105
6106 For example (from test/source-manager/TestSourceManager.py),
6107
6108 # Create the filespec for 'main.c'.
6109 filespec = lldb.SBFileSpec('main.c', False)
6110 source_mgr = self.dbg.GetSourceManager()
6111 # Use a string stream as the destination.
6112 stream = lldb.SBStream()
6113 source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
6114 self.line,
6115 2, # context before
6116 2, # context after
6117 '=>', # prefix for current line
6118 stream)
6119
6120 # 2
6121 # 3 int main(int argc, char const *argv[]) {
6122 # => 4 printf('Hello world.\n'); // Set break point at this line.
6123 # 5 return 0;
6124 # 6 }
6125 self.expect(stream.GetData(), 'Source code displayed correctly',
6126 exe=False,
6127 patterns = ['=> %d.*Hello world' % self.line])
6128
6129 """
6130 __swig_setmethods__ = {}
6131 __setattr__ = lambda self, name, value: _swig_setattr(self, SBSourceManager, name, value)
6132 __swig_getmethods__ = {}
6133 __getattr__ = lambda self, name: _swig_getattr(self, SBSourceManager, name)
6134 __repr__ = _swig_repr
6136 """__init__(lldb::SBSourceManager self, SBSourceManager rhs) -> SBSourceManager"""
6137 this = _lldb.new_SBSourceManager(*args)
6138 try: self.this.append(this)
6139 except: self.this = this
6140 __swig_destroy__ = _lldb.delete_SBSourceManager
6141 __del__ = lambda self : None;
6143 """
6144 DisplaySourceLinesWithLineNumbers(SBSourceManager self, SBFileSpec file, uint32_t line, uint32_t context_before, uint32_t context_after,
6145 str const * current_line_cstr, SBStream s) -> size_t
6146 """
6147 return _lldb.SBSourceManager_DisplaySourceLinesWithLineNumbers(self, *args)
6148
6149 SBSourceManager_swigregister = _lldb.SBSourceManager_swigregister
6150 SBSourceManager_swigregister(SBSourceManager)
6153 """
6154 Represents a destination for streaming data output to. By default, a string
6155 stream is created.
6156
6157 For example (from test/source-manager/TestSourceManager.py),
6158
6159 # Create the filespec for 'main.c'.
6160 filespec = lldb.SBFileSpec('main.c', False)
6161 source_mgr = self.dbg.GetSourceManager()
6162 # Use a string stream as the destination.
6163 stream = lldb.SBStream()
6164 source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
6165 self.line,
6166 2, # context before
6167 2, # context after
6168 '=>', # prefix for current line
6169 stream)
6170
6171 # 2
6172 # 3 int main(int argc, char const *argv[]) {
6173 # => 4 printf('Hello world.\n'); // Set break point at this line.
6174 # 5 return 0;
6175 # 6 }
6176 self.expect(stream.GetData(), 'Source code displayed correctly',
6177 exe=False,
6178 patterns = ['=> %d.*Hello world' % self.line])
6179
6180 """
6181 __swig_setmethods__ = {}
6182 __setattr__ = lambda self, name, value: _swig_setattr(self, SBStream, name, value)
6183 __swig_getmethods__ = {}
6184 __getattr__ = lambda self, name: _swig_getattr(self, SBStream, name)
6185 __repr__ = _swig_repr
6187 """__init__(lldb::SBStream self) -> SBStream"""
6188 this = _lldb.new_SBStream()
6189 try: self.this.append(this)
6190 except: self.this = this
6191 __swig_destroy__ = _lldb.delete_SBStream
6192 __del__ = lambda self : None;
6195 """IsValid(SBStream self) -> bool"""
6196 return _lldb.SBStream_IsValid(self)
6197
6199 """
6200 GetData(SBStream self) -> str const *
6201
6202 If this stream is not redirected to a file, it will maintain a local
6203 cache for the stream data which can be accessed using this accessor.
6204 """
6205 return _lldb.SBStream_GetData(self)
6206
6208 """
6209 GetSize(SBStream self) -> size_t
6210
6211 If this stream is not redirected to a file, it will maintain a local
6212 cache for the stream output whose length can be accessed using this
6213 accessor.
6214 """
6215 return _lldb.SBStream_GetSize(self)
6216
6217 - def Print(self, *args):
6218 """Print(SBStream self, str const * str)"""
6219 return _lldb.SBStream_Print(self, *args)
6220
6224
6228
6232
6234 """
6235 Clear(SBStream self)
6236
6237 If the stream is redirected to a file, forget about the file and if
6238 ownership of the file was transfered to this object, close the file.
6239 If the stream is backed by a local cache, clear this cache.
6240 """
6241 return _lldb.SBStream_Clear(self)
6242
6243 - def write(self, *args):
6244 """write(SBStream self, str const * str)"""
6245 return _lldb.SBStream_write(self, *args)
6246
6248 """flush(SBStream self)"""
6249 return _lldb.SBStream_flush(self)
6250
6251 SBStream_swigregister = _lldb.SBStream_swigregister
6252 SBStream_swigregister(SBStream)
6271 __swig_destroy__ = _lldb.delete_SBStringList
6272 __del__ = lambda self : None;
6277
6281
6283 """
6284 AppendList(SBStringList self, str const ** strv, int strc)
6285 AppendList(SBStringList self, SBStringList strings)
6286 """
6287 return _lldb.SBStringList_AppendList(self, *args)
6288
6292
6296
6300
6301 SBStringList_swigregister = _lldb.SBStringList_swigregister
6302 SBStringList_swigregister(SBStringList)
6328 """IsValid(SBSymbol self) -> bool"""
6329 return _lldb.SBSymbol_IsValid(self)
6330
6332 """GetName(SBSymbol self) -> str const *"""
6333 return _lldb.SBSymbol_GetName(self)
6334
6338
6340 """
6341 GetInstructions(SBSymbol self, SBTarget target) -> SBInstructionList
6342 GetInstructions(SBSymbol self, SBTarget target, str const * flavor_string) -> SBInstructionList
6343 """
6344 return _lldb.SBSymbol_GetInstructions(self, *args)
6345
6349
6353
6357
6359 """GetType(SBSymbol self) -> lldb::SymbolType"""
6360 return _lldb.SBSymbol_GetType(self)
6361
6365
6369
6373
6375 """__eq__(SBSymbol self, SBSymbol rhs) -> bool"""
6376 return _lldb.SBSymbol___eq__(self, *args)
6377
6379 """__ne__(SBSymbol self, SBSymbol rhs) -> bool"""
6380 return _lldb.SBSymbol___ne__(self, *args)
6381
6384
6385 __swig_getmethods__["name"] = GetName
6386 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''')
6387
6388 __swig_getmethods__["mangled"] = GetMangledName
6389 if _newclass: mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''')
6390
6391 __swig_getmethods__["type"] = GetType
6392 if _newclass: type = property(GetType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSymbolType") that represents the type of this symbol.''')
6393
6394 __swig_getmethods__["addr"] = GetStartAddress
6395 if _newclass: addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''')
6396
6397 __swig_getmethods__["end_addr"] = GetEndAddress
6398 if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this symbol.''')
6399
6400 __swig_getmethods__["prologue_size"] = GetPrologueByteSize
6401 if _newclass: prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
6402
6403 __swig_getmethods__["instructions"] = get_instructions_from_current_target
6404 if _newclass: instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this symbol.''')
6405
6406 __swig_getmethods__["external"] = IsExternal
6407 if _newclass: external = property(IsExternal, None, doc='''A read only property that returns a boolean value that indicates if this symbol is externally visiable (exported) from the module that contains it.''')
6408
6409 __swig_getmethods__["synthetic"] = IsSynthetic
6410 if _newclass: synthetic = property(IsSynthetic, None, doc='''A read only property that returns a boolean value that indicates if this symbol was synthetically created from information in module that contains it.''')
6411
6412
6413
6415 """__str__(SBSymbol self) -> PyObject *"""
6416 return _lldb.SBSymbol___str__(self)
6417
6419 if not isinstance(rhs, type(self)):
6420 return False
6421
6422 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
6423
6425 if not isinstance(rhs, type(self)):
6426 return True
6427
6428 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
6429
6430 SBSymbol_swigregister = _lldb.SBSymbol_swigregister
6431 SBSymbol_swigregister(SBSymbol)
6432
6433 -class SBSymbolContext(_object):
6434 """
6435 A context object that provides access to core debugger entities.
6436
6437 Manay debugger functions require a context when doing lookups. This class
6438 provides a common structure that can be used as the result of a query that
6439 can contain a single result.
6440
6441 For example,
6442
6443 exe = os.path.join(os.getcwd(), 'a.out')
6444
6445 # Create a target for the debugger.
6446 target = self.dbg.CreateTarget(exe)
6447
6448 # Now create a breakpoint on main.c by name 'c'.
6449 breakpoint = target.BreakpointCreateByName('c', 'a.out')
6450
6451 # Now launch the process, and do not stop at entry point.
6452 process = target.LaunchSimple(None, None, os.getcwd())
6453
6454 # The inferior should stop on 'c'.
6455 from lldbutil import get_stopped_thread
6456 thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
6457 frame0 = thread.GetFrameAtIndex(0)
6458
6459 # Now get the SBSymbolContext from this frame. We want everything. :-)
6460 context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
6461
6462 # Get the module.
6463 module = context.GetModule()
6464 ...
6465
6466 # And the compile unit associated with the frame.
6467 compileUnit = context.GetCompileUnit()
6468 ...
6469
6470 """
6471 __swig_setmethods__ = {}
6472 __setattr__ = lambda self, name, value: _swig_setattr(self, SBSymbolContext, name, value)
6473 __swig_getmethods__ = {}
6474 __getattr__ = lambda self, name: _swig_getattr(self, SBSymbolContext, name)
6475 __repr__ = _swig_repr
6476 - def __init__(self, *args):
6477 """
6478 __init__(lldb::SBSymbolContext self) -> SBSymbolContext
6479 __init__(lldb::SBSymbolContext self, SBSymbolContext rhs) -> SBSymbolContext
6480 """
6481 this = _lldb.new_SBSymbolContext(*args)
6482 try: self.this.append(this)
6483 except: self.this = this
6484 __swig_destroy__ = _lldb.delete_SBSymbolContext
6485 __del__ = lambda self : None;
6486 - def __nonzero__(self): return self.IsValid()
6487 - def IsValid(self):
6488 """IsValid(SBSymbolContext self) -> bool"""
6489 return _lldb.SBSymbolContext_IsValid(self)
6490
6491 - def GetModule(self):
6492 """GetModule(SBSymbolContext self) -> SBModule"""
6493 return _lldb.SBSymbolContext_GetModule(self)
6494
6495 - def GetCompileUnit(self):
6496 """GetCompileUnit(SBSymbolContext self) -> SBCompileUnit"""
6497 return _lldb.SBSymbolContext_GetCompileUnit(self)
6498
6499 - def GetFunction(self):
6500 """GetFunction(SBSymbolContext self) -> SBFunction"""
6501 return _lldb.SBSymbolContext_GetFunction(self)
6502
6503 - def GetBlock(self):
6504 """GetBlock(SBSymbolContext self) -> SBBlock"""
6505 return _lldb.SBSymbolContext_GetBlock(self)
6506
6507 - def GetLineEntry(self):
6508 """GetLineEntry(SBSymbolContext self) -> SBLineEntry"""
6509 return _lldb.SBSymbolContext_GetLineEntry(self)
6510
6511 - def GetSymbol(self):
6512 """GetSymbol(SBSymbolContext self) -> SBSymbol"""
6513 return _lldb.SBSymbolContext_GetSymbol(self)
6514
6515 - def SetModule(self, *args):
6516 """SetModule(SBSymbolContext self, SBModule module)"""
6517 return _lldb.SBSymbolContext_SetModule(self, *args)
6518
6519 - def SetCompileUnit(self, *args):
6520 """SetCompileUnit(SBSymbolContext self, SBCompileUnit compile_unit)"""
6521 return _lldb.SBSymbolContext_SetCompileUnit(self, *args)
6522
6523 - def SetFunction(self, *args):
6524 """SetFunction(SBSymbolContext self, SBFunction function)"""
6525 return _lldb.SBSymbolContext_SetFunction(self, *args)
6526
6527 - def SetBlock(self, *args):
6528 """SetBlock(SBSymbolContext self, SBBlock block)"""
6529 return _lldb.SBSymbolContext_SetBlock(self, *args)
6530
6531 - def SetLineEntry(self, *args):
6532 """SetLineEntry(SBSymbolContext self, SBLineEntry line_entry)"""
6533 return _lldb.SBSymbolContext_SetLineEntry(self, *args)
6534
6535 - def SetSymbol(self, *args):
6536 """SetSymbol(SBSymbolContext self, SBSymbol symbol)"""
6537 return _lldb.SBSymbolContext_SetSymbol(self, *args)
6538
6539 - def GetParentOfInlinedScope(self, *args):
6540 """GetParentOfInlinedScope(SBSymbolContext self, SBAddress curr_frame_pc, SBAddress parent_frame_addr) -> SBSymbolContext"""
6541 return _lldb.SBSymbolContext_GetParentOfInlinedScope(self, *args)
6542
6543 - def GetDescription(self, *args):
6544 """GetDescription(SBSymbolContext self, SBStream description) -> bool"""
6545 return _lldb.SBSymbolContext_GetDescription(self, *args)
6546
6547 __swig_getmethods__["module"] = GetModule
6548 __swig_setmethods__["module"] = SetModule
6549 if _newclass: module = property(GetModule, SetModule, doc='''A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context.''')
6550
6551 __swig_getmethods__["compile_unit"] = GetCompileUnit
6552 __swig_setmethods__["compile_unit"] = SetCompileUnit
6553 if _newclass: compile_unit = property(GetCompileUnit, SetCompileUnit, doc='''A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context.''')
6554
6555 __swig_getmethods__["function"] = GetFunction
6556 __swig_setmethods__["function"] = SetFunction
6557 if _newclass: function = property(GetFunction, SetFunction, doc='''A read/write property that allows the getting/setting of the function (lldb.SBFunction) in this symbol context.''')
6558
6559 __swig_getmethods__["block"] = GetBlock
6560 __swig_setmethods__["block"] = SetBlock
6561 if _newclass: block = property(GetBlock, SetBlock, doc='''A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context.''')
6562
6563 __swig_getmethods__["symbol"] = GetSymbol
6564 __swig_setmethods__["symbol"] = SetSymbol
6565 if _newclass: symbol = property(GetSymbol, SetSymbol, doc='''A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.''')
6566
6567 __swig_getmethods__["line_entry"] = GetLineEntry
6568 __swig_setmethods__["line_entry"] = SetLineEntry
6569 if _newclass: line_entry = property(GetLineEntry, SetLineEntry, doc='''A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context.''')
6570
6571 - def __str__(self):
6572 """__str__(SBSymbolContext self) -> PyObject *"""
6573 return _lldb.SBSymbolContext___str__(self)
6574
6575 SBSymbolContext_swigregister = _lldb.SBSymbolContext_swigregister
6576 SBSymbolContext_swigregister(SBSymbolContext)
6577
6578 -class SBSymbolContextList(_object):
6579 """
6580 Represents a list of symbol context object. See also SBSymbolContext.
6581
6582 For example (from test/python_api/target/TestTargetAPI.py),
6583
6584 def find_functions(self, exe_name):
6585 '''Exercise SBTaget.FindFunctions() API.'''
6586 exe = os.path.join(os.getcwd(), exe_name)
6587
6588 # Create a target by the debugger.
6589 target = self.dbg.CreateTarget(exe)
6590 self.assertTrue(target, VALID_TARGET)
6591
6592 list = lldb.SBSymbolContextList()
6593 num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
6594 self.assertTrue(num == 1 and list.GetSize() == 1)
6595
6596 for sc in list:
6597 self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)
6598 self.assertTrue(sc.GetSymbol().GetName() == 'c')
6599
6600 """
6601 __swig_setmethods__ = {}
6602 __setattr__ = lambda self, name, value: _swig_setattr(self, SBSymbolContextList, name, value)
6603 __swig_getmethods__ = {}
6604 __getattr__ = lambda self, name: _swig_getattr(self, SBSymbolContextList, name)
6605 __repr__ = _swig_repr
6606 - def __iter__(self): return lldb_iter(self, 'GetSize', 'GetContextAtIndex')
6607 - def __len__(self): return self.GetSize()
6608 - def __init__(self, *args):
6609 """
6610 __init__(lldb::SBSymbolContextList self) -> SBSymbolContextList
6611 __init__(lldb::SBSymbolContextList self, SBSymbolContextList rhs) -> SBSymbolContextList
6612 """
6613 this = _lldb.new_SBSymbolContextList(*args)
6614 try: self.this.append(this)
6615 except: self.this = this
6616 __swig_destroy__ = _lldb.delete_SBSymbolContextList
6617 __del__ = lambda self : None;
6618 - def __nonzero__(self): return self.IsValid()
6619 - def IsValid(self):
6620 """IsValid(SBSymbolContextList self) -> bool"""
6621 return _lldb.SBSymbolContextList_IsValid(self)
6622
6623 - def GetSize(self):
6624 """GetSize(SBSymbolContextList self) -> uint32_t"""
6625 return _lldb.SBSymbolContextList_GetSize(self)
6626
6627 - def GetContextAtIndex(self, *args):
6628 """GetContextAtIndex(SBSymbolContextList self, uint32_t idx) -> SBSymbolContext"""
6629 return _lldb.SBSymbolContextList_GetContextAtIndex(self, *args)
6630
6631 - def Append(self, *args):
6632 """
6633 Append(SBSymbolContextList self, SBSymbolContext sc)
6634 Append(SBSymbolContextList self, SBSymbolContextList sc_list)
6635 """
6636 return _lldb.SBSymbolContextList_Append(self, *args)
6637
6638 - def GetDescription(self, *args):
6639 """GetDescription(SBSymbolContextList self, SBStream description) -> bool"""
6640 return _lldb.SBSymbolContextList_GetDescription(self, *args)
6641
6643 """Clear(SBSymbolContextList self)"""
6644 return _lldb.SBSymbolContextList_Clear(self)
6645
6646 - def __len__(self):
6647 return int(self.GetSize())
6648
6649 - def __getitem__(self, key):
6650 count = len(self)
6651 if type(key) is int:
6652 if key < count:
6653 return self.GetContextAtIndex(key)
6654 else:
6655 raise IndexError
6656 raise TypeError
6657
6658 - def get_module_array(self):
6659 a = []
6660 for i in range(len(self)):
6661 obj = self.GetContextAtIndex(i).module
6662 if obj:
6663 a.append(obj)
6664 return a
6665
6667 a = []
6668 for i in range(len(self)):
6669 obj = self.GetContextAtIndex(i).compile_unit
6670 if obj:
6671 a.append(obj)
6672 return a
6674 a = []
6675 for i in range(len(self)):
6676 obj = self.GetContextAtIndex(i).function
6677 if obj:
6678 a.append(obj)
6679 return a
6680 - def get_block_array(self):
6681 a = []
6682 for i in range(len(self)):
6683 obj = self.GetContextAtIndex(i).block
6684 if obj:
6685 a.append(obj)
6686 return a
6687 - def get_symbol_array(self):
6688 a = []
6689 for i in range(len(self)):
6690 obj = self.GetContextAtIndex(i).symbol
6691 if obj:
6692 a.append(obj)
6693 return a
6695 a = []
6696 for i in range(len(self)):
6697 obj = self.GetContextAtIndex(i).line_entry
6698 if obj:
6699 a.append(obj)
6700 return a
6701 __swig_getmethods__["modules"] = get_module_array
6702 if _newclass: modules = property(get_module_array, None, doc='''Returns a list() of lldb.SBModule objects, one for each module in each SBSymbolContext object in this list.''')
6703
6704 __swig_getmethods__["compile_units"] = get_compile_unit_array
6705 if _newclass: compile_units = property(get_compile_unit_array, None, doc='''Returns a list() of lldb.SBCompileUnit objects, one for each compile unit in each SBSymbolContext object in this list.''')
6706
6707 __swig_getmethods__["functions"] = get_function_array
6708 if _newclass: functions = property(get_function_array, None, doc='''Returns a list() of lldb.SBFunction objects, one for each function in each SBSymbolContext object in this list.''')
6709
6710 __swig_getmethods__["blocks"] = get_block_array
6711 if _newclass: blocks = property(get_block_array, None, doc='''Returns a list() of lldb.SBBlock objects, one for each block in each SBSymbolContext object in this list.''')
6712
6713 __swig_getmethods__["line_entries"] = get_line_entry_array
6714 if _newclass: line_entries = property(get_line_entry_array, None, doc='''Returns a list() of lldb.SBLineEntry objects, one for each line entry in each SBSymbolContext object in this list.''')
6715
6716 __swig_getmethods__["symbols"] = get_symbol_array
6717 if _newclass: symbols = property(get_symbol_array, None, doc='''Returns a list() of lldb.SBSymbol objects, one for each symbol in each SBSymbolContext object in this list.''')
6718
6719 - def __str__(self):
6720 """__str__(SBSymbolContextList self) -> PyObject *"""
6721 return _lldb.SBSymbolContextList___str__(self)
6722
6723 SBSymbolContextList_swigregister = _lldb.SBSymbolContextList_swigregister
6724 SBSymbolContextList_swigregister(SBSymbolContextList)
6741
6745
6749
6753
6757
6761
6765
6769
6773
6777
6779 """GetEnvironmentEntryAtIndex(SBLaunchInfo self, uint32_t idx) -> str const *"""
6780 return _lldb.SBLaunchInfo_GetEnvironmentEntryAtIndex(self, *args)
6781
6785
6789
6793
6797
6801
6805
6809
6813
6817
6821
6825
6829
6833
6837
6841
6845
6846 __swig_destroy__ = _lldb.delete_SBLaunchInfo
6847 __del__ = lambda self : None;
6848 SBLaunchInfo_swigregister = _lldb.SBLaunchInfo_swigregister
6849 SBLaunchInfo_swigregister(SBLaunchInfo)
6852 """Proxy of C++ lldb::SBAttachInfo class"""
6853 __swig_setmethods__ = {}
6854 __setattr__ = lambda self, name, value: _swig_setattr(self, SBAttachInfo, name, value)
6855 __swig_getmethods__ = {}
6856 __getattr__ = lambda self, name: _swig_getattr(self, SBAttachInfo, name)
6857 __repr__ = _swig_repr
6859 """
6860 __init__(lldb::SBAttachInfo self) -> SBAttachInfo
6861 __init__(lldb::SBAttachInfo self, lldb::pid_t pid) -> SBAttachInfo
6862 __init__(lldb::SBAttachInfo self, str const * path, bool wait_for) -> SBAttachInfo
6863 __init__(lldb::SBAttachInfo self, SBAttachInfo rhs) -> SBAttachInfo
6864 """
6865 this = _lldb.new_SBAttachInfo(*args)
6866 try: self.this.append(this)
6867 except: self.this = this
6871
6875
6877 """
6878 SetExecutable(SBAttachInfo self, str const * path)
6879 SetExecutable(SBAttachInfo self, SBFileSpec exe_file)
6880 """
6881 return _lldb.SBAttachInfo_SetExecutable(self, *args)
6882
6886
6890
6894
6898
6902
6906
6910
6914
6918
6922
6926
6930
6934
6938
6942
6946
6950
6954
6958
6962
6966
6970
6974
6975 __swig_destroy__ = _lldb.delete_SBAttachInfo
6976 __del__ = lambda self : None;
6977 SBAttachInfo_swigregister = _lldb.SBAttachInfo_swigregister
6978 SBAttachInfo_swigregister(SBAttachInfo)
6981 """
6982 Represents the target program running under the debugger.
6983
6984 SBTarget supports module, breakpoint, and watchpoint iterations. For example,
6985
6986 for m in target.module_iter():
6987 print m
6988
6989 produces:
6990
6991 (x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
6992 (x86_64) /usr/lib/dyld
6993 (x86_64) /usr/lib/libstdc++.6.dylib
6994 (x86_64) /usr/lib/libSystem.B.dylib
6995 (x86_64) /usr/lib/system/libmathCommon.A.dylib
6996 (x86_64) /usr/lib/libSystem.B.dylib(__commpage)
6997
6998 and,
6999
7000 for b in target.breakpoint_iter():
7001 print b
7002
7003 produces:
7004
7005 SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
7006 SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
7007
7008 and,
7009
7010 for wp_loc in target.watchpoint_iter():
7011 print wp_loc
7012
7013 produces:
7014
7015 Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
7016 declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
7017 hw_index = 0 hit_count = 2 ignore_count = 0
7018 """
7019 __swig_setmethods__ = {}
7020 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTarget, name, value)
7021 __swig_getmethods__ = {}
7022 __getattr__ = lambda self, name: _swig_getattr(self, SBTarget, name)
7023 __repr__ = _swig_repr
7024 eBroadcastBitBreakpointChanged = _lldb.SBTarget_eBroadcastBitBreakpointChanged
7025 eBroadcastBitModulesLoaded = _lldb.SBTarget_eBroadcastBitModulesLoaded
7026 eBroadcastBitModulesUnloaded = _lldb.SBTarget_eBroadcastBitModulesUnloaded
7027 eBroadcastBitWatchpointChanged = _lldb.SBTarget_eBroadcastBitWatchpointChanged
7028 eBroadcastBitSymbolsLoaded = _lldb.SBTarget_eBroadcastBitSymbolsLoaded
7033 """
7034 __init__(lldb::SBTarget self) -> SBTarget
7035 __init__(lldb::SBTarget self, SBTarget rhs) -> SBTarget
7036 """
7037 this = _lldb.new_SBTarget(*args)
7038 try: self.this.append(this)
7039 except: self.this = this
7040 __swig_destroy__ = _lldb.delete_SBTarget
7041 __del__ = lambda self : None;
7045
7046 if _newclass:GetBroadcasterClassName = staticmethod(GetBroadcasterClassName)
7047 __swig_getmethods__["GetBroadcasterClassName"] = lambda x: GetBroadcasterClassName
7050 """IsValid(SBTarget self) -> bool"""
7051 return _lldb.SBTarget_IsValid(self)
7052
7056
7058 """
7059 LaunchSimple(SBTarget self, str const ** argv, str const ** envp, str const * working_directory) -> SBProcess
7060
7061 Launch a new process with sensible defaults.
7062
7063 @param[in] argv
7064 The argument array.
7065
7066 @param[in] envp
7067 The environment array.
7068
7069 @param[in] working_directory
7070 The working directory to have the child process run in
7071
7072 Default: listener
7073 Set to the target's debugger (SBTarget::GetDebugger())
7074
7075 Default: launch_flags
7076 Empty launch flags
7077
7078 Default: stdin_path
7079 Default: stdout_path
7080 Default: stderr_path
7081 A pseudo terminal will be used.
7082
7083 @return
7084 A process object for the newly created process.
7085
7086 For example,
7087
7088 process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd())
7089
7090 launches a new process by passing 'X', 'Y', 'Z' as the args to the
7091 executable.
7092 """
7093 return _lldb.SBTarget_LaunchSimple(self, *args)
7094
7096 """
7097 Launch(SBTarget self, SBListener listener, str const ** argv, str const ** envp, str const * stdin_path,
7098 str const * stdout_path, str const * stderr_path, str const * working_directory,
7099 uint32_t launch_flags, bool stop_at_entry, SBError error) -> SBProcess
7100 Launch(SBTarget self, SBLaunchInfo launch_info, SBError error) -> SBProcess
7101
7102 Launch a new process.
7103
7104 Launch a new process by spawning a new process using the
7105 target object's executable module's file as the file to launch.
7106 Arguments are given in argv, and the environment variables
7107 are in envp. Standard input and output files can be
7108 optionally re-directed to stdin_path, stdout_path, and
7109 stderr_path.
7110
7111 @param[in] listener
7112 An optional listener that will receive all process events.
7113 If listener is valid then listener will listen to all
7114 process events. If not valid, then this target's debugger
7115 (SBTarget::GetDebugger()) will listen to all process events.
7116
7117 @param[in] argv
7118 The argument array.
7119
7120 @param[in] envp
7121 The environment array.
7122
7123 @param[in] launch_flags
7124 Flags to modify the launch (@see lldb::LaunchFlags)
7125
7126 @param[in] stdin_path
7127 The path to use when re-directing the STDIN of the new
7128 process. If all stdXX_path arguments are NULL, a pseudo
7129 terminal will be used.
7130
7131 @param[in] stdout_path
7132 The path to use when re-directing the STDOUT of the new
7133 process. If all stdXX_path arguments are NULL, a pseudo
7134 terminal will be used.
7135
7136 @param[in] stderr_path
7137 The path to use when re-directing the STDERR of the new
7138 process. If all stdXX_path arguments are NULL, a pseudo
7139 terminal will be used.
7140
7141 @param[in] working_directory
7142 The working directory to have the child process run in
7143
7144 @param[in] launch_flags
7145 Some launch options specified by logical OR'ing
7146 lldb::LaunchFlags enumeration values together.
7147
7148 @param[in] stop_at_endtry
7149 If false do not stop the inferior at the entry point.
7150
7151 @param[out]
7152 An error object. Contains the reason if there is some failure.
7153
7154 @return
7155 A process object for the newly created process.
7156
7157 For example,
7158
7159 process = target.Launch(self.dbg.GetListener(), None, None,
7160 None, '/tmp/stdout.txt', None,
7161 None, 0, False, error)
7162
7163 launches a new process by passing nothing for both the args and the envs
7164 and redirect the standard output of the inferior to the /tmp/stdout.txt
7165 file. It does not specify a working directory so that the debug server
7166 will use its idea of what the current working directory is for the
7167 inferior. Also, we ask the debugger not to stop the inferior at the
7168 entry point. If no breakpoint is specified for the inferior, it should
7169 run to completion if no user interaction is required.
7170 """
7171 return _lldb.SBTarget_Launch(self, *args)
7172
7174 """
7175 LoadCore(SBTarget self, str const * core_file) -> SBProcess
7176
7177 Load a core file
7178
7179 @param[in] core_file
7180 File path of the core dump.
7181
7182 @return
7183 A process object for the newly created core file.
7184
7185 For example,
7186
7187 process = target.LoadCore('./a.out.core')
7188
7189 loads a new core file and returns the process object.
7190 """
7191 return _lldb.SBTarget_LoadCore(self, *args)
7192
7194 """Attach(SBTarget self, SBAttachInfo attach_info, SBError error) -> SBProcess"""
7195 return _lldb.SBTarget_Attach(self, *args)
7196
7198 """
7199 AttachToProcessWithID(SBTarget self, SBListener listener, lldb::pid_t pid, SBError error) -> SBProcess
7200
7201 Attach to process with pid.
7202
7203 @param[in] listener
7204 An optional listener that will receive all process events.
7205 If listener is valid then listener will listen to all
7206 process events. If not valid, then this target's debugger
7207 (SBTarget::GetDebugger()) will listen to all process events.
7208
7209 @param[in] pid
7210 The process ID to attach to.
7211
7212 @param[out]
7213 An error explaining what went wrong if attach fails.
7214
7215 @return
7216 A process object for the attached process.
7217 """
7218 return _lldb.SBTarget_AttachToProcessWithID(self, *args)
7219
7221 """
7222 AttachToProcessWithName(SBTarget self, SBListener listener, str const * name, bool wait_for, SBError error) -> SBProcess
7223
7224 Attach to process with name.
7225
7226 @param[in] listener
7227 An optional listener that will receive all process events.
7228 If listener is valid then listener will listen to all
7229 process events. If not valid, then this target's debugger
7230 (SBTarget::GetDebugger()) will listen to all process events.
7231
7232 @param[in] name
7233 Basename of process to attach to.
7234
7235 @param[in] wait_for
7236 If true wait for a new instance of 'name' to be launched.
7237
7238 @param[out]
7239 An error explaining what went wrong if attach fails.
7240
7241 @return
7242 A process object for the attached process.
7243 """
7244 return _lldb.SBTarget_AttachToProcessWithName(self, *args)
7245
7247 """
7248 ConnectRemote(SBTarget self, SBListener listener, str const * url, str const * plugin_name, SBError error) -> SBProcess
7249
7250 Connect to a remote debug server with url.
7251
7252 @param[in] listener
7253 An optional listener that will receive all process events.
7254 If listener is valid then listener will listen to all
7255 process events. If not valid, then this target's debugger
7256 (SBTarget::GetDebugger()) will listen to all process events.
7257
7258 @param[in] url
7259 The url to connect to, e.g., 'connect://localhost:12345'.
7260
7261 @param[in] plugin_name
7262 The plugin name to be used; can be NULL.
7263
7264 @param[out]
7265 An error explaining what went wrong if the connect fails.
7266
7267 @return
7268 A process object for the connected process.
7269 """
7270 return _lldb.SBTarget_ConnectRemote(self, *args)
7271
7275
7277 """
7278 AddModule(SBTarget self, SBModule module) -> bool
7279 AddModule(SBTarget self, str const * path, str const * triple, str const * uuid) -> SBModule
7280 AddModule(SBTarget self, str const * path, str const * triple, str const * uuid_cstr, str const * symfile) -> SBModule
7281 AddModule(SBTarget self, SBModuleSpec module_spec) -> SBModule
7282 """
7283 return _lldb.SBTarget_AddModule(self, *args)
7284
7288
7292
7296
7300
7302 """FindModule(SBTarget self, SBFileSpec file_spec) -> SBModule"""
7303 return _lldb.SBTarget_FindModule(self, *args)
7304
7308
7312
7314 """GetTriple(SBTarget self) -> str const *"""
7315 return _lldb.SBTarget_GetTriple(self)
7316
7318 """SetSectionLoadAddress(SBTarget self, SBSection section, lldb::addr_t section_base_addr) -> SBError"""
7319 return _lldb.SBTarget_SetSectionLoadAddress(self, *args)
7320
7324
7328
7332
7334 """
7335 FindFunctions(SBTarget self, str const * name, uint32_t name_type_mask=eFunctionNameTypeAny) -> SBSymbolContextList
7336 FindFunctions(SBTarget self, str const * name) -> SBSymbolContextList
7337
7338 Find functions by name.
7339
7340 @param[in] name
7341 The name of the function we are looking for.
7342
7343 @param[in] name_type_mask
7344 A logical OR of one or more FunctionNameType enum bits that
7345 indicate what kind of names should be used when doing the
7346 lookup. Bits include fully qualified names, base names,
7347 C++ methods, or ObjC selectors.
7348 See FunctionNameType for more details.
7349
7350 @return
7351 A lldb::SBSymbolContextList that gets filled in with all of
7352 the symbol contexts for all the matches.
7353 """
7354 return _lldb.SBTarget_FindFunctions(self, *args)
7355
7359
7361 """FindTypes(SBTarget self, str const * type) -> SBTypeList"""
7362 return _lldb.SBTarget_FindTypes(self, *args)
7363
7367
7371
7373 """
7374 FindGlobalVariables(SBTarget self, str const * name, uint32_t max_matches) -> SBValueList
7375
7376 Find global and static variables by name.
7377
7378 @param[in] name
7379 The name of the global or static variable we are looking
7380 for.
7381
7382 @param[in] max_matches
7383 Allow the number of matches to be limited to max_matches.
7384
7385 @return
7386 A list of matched variables in an SBValueList.
7387 """
7388 return _lldb.SBTarget_FindGlobalVariables(self, *args)
7389
7391 """
7392 FindFirstGlobalVariable(SBTarget self, str const * name) -> SBValue
7393
7394 Find the first global (or static) variable by name.
7395
7396 @param[in] name
7397 The name of the global or static variable we are looking
7398 for.
7399
7400 @return
7401 An SBValue that gets filled in with the found variable (if any).
7402 """
7403 return _lldb.SBTarget_FindFirstGlobalVariable(self, *args)
7404
7406 """Clear(SBTarget self)"""
7407 return _lldb.SBTarget_Clear(self)
7408
7412
7414 """ResolveSymbolContextForAddress(SBTarget self, SBAddress addr, uint32_t resolve_scope) -> SBSymbolContext"""
7415 return _lldb.SBTarget_ResolveSymbolContextForAddress(self, *args)
7416
7418 """
7419 BreakpointCreateByLocation(SBTarget self, str const * file, uint32_t line) -> SBBreakpoint
7420 BreakpointCreateByLocation(SBTarget self, SBFileSpec file_spec, uint32_t line) -> SBBreakpoint
7421 """
7422 return _lldb.SBTarget_BreakpointCreateByLocation(self, *args)
7423
7425 """
7426 BreakpointCreateByName(SBTarget self, str const * symbol_name, str const * module_name=None) -> SBBreakpoint
7427 BreakpointCreateByName(SBTarget self, str const * symbol_name) -> SBBreakpoint
7428 BreakpointCreateByName(SBTarget self, str const * symbol_name, uint32_t func_name_type, SBFileSpecList module_list, SBFileSpecList comp_unit_list) -> SBBreakpoint
7429 """
7430 return _lldb.SBTarget_BreakpointCreateByName(self, *args)
7431
7433 """
7434 BreakpointCreateByNames(SBTarget self, str const *[] symbol_name, uint32_t num_names, uint32_t name_type_mask, SBFileSpecList module_list,
7435 SBFileSpecList comp_unit_list) -> SBBreakpoint
7436 """
7437 return _lldb.SBTarget_BreakpointCreateByNames(self, *args)
7438
7440 """
7441 BreakpointCreateByRegex(SBTarget self, str const * symbol_name_regex, str const * module_name=None) -> SBBreakpoint
7442 BreakpointCreateByRegex(SBTarget self, str const * symbol_name_regex) -> SBBreakpoint
7443 """
7444 return _lldb.SBTarget_BreakpointCreateByRegex(self, *args)
7445
7447 """
7448 BreakpointCreateBySourceRegex(SBTarget self, str const * source_regex, SBFileSpec source_file, str const * module_name=None) -> SBBreakpoint
7449 BreakpointCreateBySourceRegex(SBTarget self, str const * source_regex, SBFileSpec source_file) -> SBBreakpoint
7450 """
7451 return _lldb.SBTarget_BreakpointCreateBySourceRegex(self, *args)
7452
7456
7460
7464
7468
7472
7476
7480
7484
7488
7492
7496
7500
7504
7508
7512
7516
7518 """WatchAddress(SBTarget self, lldb::addr_t addr, size_t size, bool read, bool write, SBError error) -> SBWatchpoint"""
7519 return _lldb.SBTarget_WatchAddress(self, *args)
7520
7524
7526 """
7527 ReadInstructions(SBTarget self, SBAddress base_addr, uint32_t count) -> SBInstructionList
7528 ReadInstructions(SBTarget self, SBAddress base_addr, uint32_t count, str const * flavor_string) -> SBInstructionList
7529 """
7530 return _lldb.SBTarget_ReadInstructions(self, *args)
7531
7533 """GetInstructions(SBTarget self, SBAddress base_addr, void const * buf) -> SBInstructionList"""
7534 return _lldb.SBTarget_GetInstructions(self, *args)
7535
7537 """GetInstructionsWithFlavor(SBTarget self, SBAddress base_addr, str const * flavor_string, void const * buf) -> SBInstructionList"""
7538 return _lldb.SBTarget_GetInstructionsWithFlavor(self, *args)
7539
7541 """
7542 FindSymbols(SBTarget self, str const * name, lldb::SymbolType type=eSymbolTypeAny) -> SBSymbolContextList
7543 FindSymbols(SBTarget self, str const * name) -> SBSymbolContextList
7544 """
7545 return _lldb.SBTarget_FindSymbols(self, *args)
7546
7548 """GetDescription(SBTarget self, SBStream description, lldb::DescriptionLevel description_level) -> bool"""
7549 return _lldb.SBTarget_GetDescription(self, *args)
7550
7554
7556 """__eq__(SBTarget self, SBTarget rhs) -> bool"""
7557 return _lldb.SBTarget___eq__(self, *args)
7558
7560 """__ne__(SBTarget self, SBTarget rhs) -> bool"""
7561 return _lldb.SBTarget___ne__(self, *args)
7562
7564 """EvaluateExpression(SBTarget self, str const * expr, SBExpressionOptions options) -> SBValue"""
7565 return _lldb.SBTarget_EvaluateExpression(self, *args)
7566
7568 '''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.'''
7570 self.sbtarget = sbtarget
7571
7573 if self.sbtarget:
7574 return int(self.sbtarget.GetNumModules())
7575 return 0
7576
7619
7621 '''An accessor function that returns a modules_access() object which allows lazy module access from a lldb.SBTarget object.'''
7622 return self.modules_access (self)
7623
7630
7631 __swig_getmethods__["modules"] = get_modules_array
7632 if _newclass: modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''')
7633
7634 __swig_getmethods__["module"] = get_modules_access_object
7635 if _newclass: module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n target.module[<int>] allows array access to any modules.\n target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n target.module[uuid.UUID()] allows module access by UUID.\n target.module[re] allows module access using a regular expression that matches the module full path.''')
7636
7637 __swig_getmethods__["process"] = GetProcess
7638 if _newclass: process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''')
7639
7640 __swig_getmethods__["executable"] = GetExecutable
7641 if _newclass: executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''')
7642
7643 __swig_getmethods__["debugger"] = GetDebugger
7644 if _newclass: debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''')
7645
7646 __swig_getmethods__["num_breakpoints"] = GetNumBreakpoints
7647 if _newclass: num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''')
7648
7649 __swig_getmethods__["num_watchpoints"] = GetNumWatchpoints
7650 if _newclass: num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''')
7651
7652 __swig_getmethods__["broadcaster"] = GetBroadcaster
7653 if _newclass: broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''')
7654
7655 __swig_getmethods__["byte_order"] = GetByteOrder
7656 if _newclass: byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''')
7657
7658 __swig_getmethods__["addr_size"] = GetAddressByteSize
7659 if _newclass: addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''')
7660
7661 __swig_getmethods__["triple"] = GetTriple
7662 if _newclass: triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''')
7663
7665 """__str__(SBTarget self) -> PyObject *"""
7666 return _lldb.SBTarget___str__(self)
7667
7669 if not isinstance(rhs, type(self)):
7670 return False
7671
7672 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
7673
7675 if not isinstance(rhs, type(self)):
7676 return True
7677
7678 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
7679
7680 SBTarget_swigregister = _lldb.SBTarget_swigregister
7681 SBTarget_swigregister(SBTarget)
7686
7688 """
7689 Represents a thread of execution. SBProcess contains SBThread(s).
7690
7691 SBThreads can be referred to by their ID, which maps to the system specific thread
7692 identifier, or by IndexID. The ID may or may not be unique depending on whether the
7693 system reuses its thread identifiers. The IndexID is a monotonically increasing identifier
7694 that will always uniquely reference a particular thread, and when that thread goes
7695 away it will not be reused.
7696
7697 SBThread supports frame iteration. For example (from test/python_api/
7698 lldbutil/iter/TestLLDBIterator.py),
7699
7700 from lldbutil import print_stacktrace
7701 stopped_due_to_breakpoint = False
7702 for thread in process:
7703 if self.TraceOn():
7704 print_stacktrace(thread)
7705 ID = thread.GetThreadID()
7706 if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
7707 stopped_due_to_breakpoint = True
7708 for frame in thread:
7709 self.assertTrue(frame.GetThread().GetThreadID() == ID)
7710 if self.TraceOn():
7711 print frame
7712
7713 self.assertTrue(stopped_due_to_breakpoint)
7714
7715 See also SBProcess and SBFrame.
7716 """
7717 __swig_setmethods__ = {}
7718 __setattr__ = lambda self, name, value: _swig_setattr(self, SBThread, name, value)
7719 __swig_getmethods__ = {}
7720 __getattr__ = lambda self, name: _swig_getattr(self, SBThread, name)
7721 __repr__ = _swig_repr
7725 """
7726 __init__(lldb::SBThread self) -> SBThread
7727 __init__(lldb::SBThread self, SBThread thread) -> SBThread
7728 """
7729 this = _lldb.new_SBThread(*args)
7730 try: self.this.append(this)
7731 except: self.this = this
7732 __swig_destroy__ = _lldb.delete_SBThread
7733 __del__ = lambda self : None;
7737
7738 if _newclass:EventIsThreadEvent = staticmethod(EventIsThreadEvent)
7739 __swig_getmethods__["EventIsThreadEvent"] = lambda x: EventIsThreadEvent
7743
7744 if _newclass:GetStackFrameFromEvent = staticmethod(GetStackFrameFromEvent)
7745 __swig_getmethods__["GetStackFrameFromEvent"] = lambda x: GetStackFrameFromEvent
7749
7750 if _newclass:GetThreadFromEvent = staticmethod(GetThreadFromEvent)
7751 __swig_getmethods__["GetThreadFromEvent"] = lambda x: GetThreadFromEvent
7754 """IsValid(SBThread self) -> bool"""
7755 return _lldb.SBThread_IsValid(self)
7756
7758 """Clear(SBThread self)"""
7759 return _lldb.SBThread_Clear(self)
7760
7764
7766 """
7767 GetStopReasonDataCount(SBThread self) -> size_t
7768
7769 Get the number of words associated with the stop reason.
7770 See also GetStopReasonDataAtIndex().
7771 """
7772 return _lldb.SBThread_GetStopReasonDataCount(self)
7773
7775 """
7776 GetStopReasonDataAtIndex(SBThread self, uint32_t idx) -> uint64_t
7777
7778 Get information associated with a stop reason.
7779
7780 Breakpoint stop reasons will have data that consists of pairs of
7781 breakpoint IDs followed by the breakpoint location IDs (they always come
7782 in pairs).
7783
7784 Stop Reason Count Data Type
7785 ======================== ===== =========================================
7786 eStopReasonNone 0
7787 eStopReasonTrace 0
7788 eStopReasonBreakpoint N duple: {breakpoint id, location id}
7789 eStopReasonWatchpoint 1 watchpoint id
7790 eStopReasonSignal 1 unix signal number
7791 eStopReasonException N exception data
7792 eStopReasonExec 0
7793 eStopReasonPlanComplete 0
7794 """
7795 return _lldb.SBThread_GetStopReasonDataAtIndex(self, *args)
7796
7798 """
7799 Pass only an (int)length and expect to get a Python string describing the
7800 stop reason.
7801 """
7802 return _lldb.SBThread_GetStopDescription(self, *args)
7803
7807
7811
7815
7817 """GetName(SBThread self) -> str const *"""
7818 return _lldb.SBThread_GetName(self)
7819
7823
7825 """
7826 StepOver(SBThread self, lldb::RunMode stop_other_threads=eOnlyDuringStepping)
7827 StepOver(SBThread self)
7828 """
7829 return _lldb.SBThread_StepOver(self, *args)
7830
7832 """
7833 StepInto(SBThread self, lldb::RunMode stop_other_threads=eOnlyDuringStepping)
7834 StepInto(SBThread self)
7835 StepInto(SBThread self, str const * target_name, lldb::RunMode stop_other_threads=eOnlyDuringStepping)
7836 StepInto(SBThread self, str const * target_name)
7837 """
7838 return _lldb.SBThread_StepInto(self, *args)
7839
7843
7847
7851
7853 """StepOverUntil(SBThread self, SBFrame frame, SBFileSpec file_spec, uint32_t line) -> SBError"""
7854 return _lldb.SBThread_StepOverUntil(self, *args)
7855
7859
7861 """ReturnFromFrame(SBThread self, SBFrame frame, SBValue return_value) -> SBError"""
7862 return _lldb.SBThread_ReturnFromFrame(self, *args)
7863
7865 """
7866 Suspend(SBThread self) -> bool
7867
7868 LLDB currently supports process centric debugging which means when any
7869 thread in a process stops, all other threads are stopped. The Suspend()
7870 call here tells our process to suspend a thread and not let it run when
7871 the other threads in a process are allowed to run. So when
7872 SBProcess::Continue() is called, any threads that aren't suspended will
7873 be allowed to run. If any of the SBThread functions for stepping are
7874 called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the
7875 thread will now be allowed to run and these funtions will simply return.
7876
7877 Eventually we plan to add support for thread centric debugging where
7878 each thread is controlled individually and each thread would broadcast
7879 its state, but we haven't implemented this yet.
7880
7881 Likewise the SBThread::Resume() call will again allow the thread to run
7882 when the process is continued.
7883
7884 Suspend() and Resume() functions are not currently reference counted, if
7885 anyone has the need for them to be reference counted, please let us
7886 know.
7887 """
7888 return _lldb.SBThread_Suspend(self)
7889
7891 """Resume(SBThread self) -> bool"""
7892 return _lldb.SBThread_Resume(self)
7893
7897
7901
7905
7909
7913
7917
7921
7925
7927 """GetStatus(SBThread self, SBStream status) -> bool"""
7928 return _lldb.SBThread_GetStatus(self, *args)
7929
7931 """__eq__(SBThread self, SBThread rhs) -> bool"""
7932 return _lldb.SBThread___eq__(self, *args)
7933
7935 """__ne__(SBThread self, SBThread rhs) -> bool"""
7936 return _lldb.SBThread___ne__(self, *args)
7937
7939 '''A helper object that will lazily hand out frames for a thread when supplied an index.'''
7941 self.sbthread = sbthread
7942
7944 if self.sbthread:
7945 return int(self.sbthread.GetNumFrames())
7946 return 0
7947
7952
7954 '''An accessor function that returns a frames_access() object which allows lazy frame access from a lldb.SBThread object.'''
7955 return self.frames_access (self)
7956
7958 '''An accessor function that returns a list() that contains all frames in a lldb.SBThread object.'''
7959 frames = []
7960 for frame in self:
7961 frames.append(frame)
7962 return frames
7963
7964 __swig_getmethods__["id"] = GetThreadID
7965 if _newclass: id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''')
7966
7967 __swig_getmethods__["idx"] = GetIndexID
7968 if _newclass: idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''')
7969
7970 __swig_getmethods__["return_value"] = GetStopReturnValue
7971 if _newclass: return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''')
7972
7973 __swig_getmethods__["process"] = GetProcess
7974 if _newclass: process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''')
7975
7976 __swig_getmethods__["num_frames"] = GetNumFrames
7977 if _newclass: num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''')
7978
7979 __swig_getmethods__["frames"] = get_thread_frames
7980 if _newclass: frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''')
7981
7982 __swig_getmethods__["frame"] = get_frames_access_object
7983 if _newclass: frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''')
7984
7985 __swig_getmethods__["name"] = GetName
7986 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''')
7987
7988 __swig_getmethods__["queue"] = GetQueueName
7989 if _newclass: queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''')
7990
7991 __swig_getmethods__["stop_reason"] = GetStopReason
7992 if _newclass: stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''')
7993
7994 __swig_getmethods__["is_suspended"] = IsSuspended
7995 if _newclass: is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''')
7996
7997 __swig_getmethods__["is_stopped"] = IsStopped
7998 if _newclass: is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''')
7999
8001 """__str__(SBThread self) -> PyObject *"""
8002 return _lldb.SBThread___str__(self)
8003
8005 if not isinstance(rhs, type(self)):
8006 return False
8007
8008 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
8009
8011 if not isinstance(rhs, type(self)):
8012 return True
8013
8014 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
8015
8016 SBThread_swigregister = _lldb.SBThread_swigregister
8017 SBThread_swigregister(SBThread)
8022
8026
8030
8049 __swig_destroy__ = _lldb.delete_SBTypeMember
8050 __del__ = lambda self : None;
8055
8059
8063
8067
8071
8075
8079
8080 __swig_getmethods__["name"] = GetName
8081 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this member as a string.''')
8082
8083 __swig_getmethods__["type"] = GetType
8084 if _newclass: type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this member.''')
8085
8086 __swig_getmethods__["byte_offset"] = GetOffsetInBytes
8087 if _newclass: byte_offset = property(GetOffsetInBytes, None, doc='''A read only property that returns offset in bytes for this member as an integer.''')
8088
8089 __swig_getmethods__["bit_offset"] = GetOffsetInBits
8090 if _newclass: bit_offset = property(GetOffsetInBits, None, doc='''A read only property that returns offset in bits for this member as an integer.''')
8091
8092 __swig_getmethods__["is_bitfield"] = IsBitfield
8093 if _newclass: is_bitfield = property(IsBitfield, None, doc='''A read only property that returns true if this member is a bitfield.''')
8094
8095 __swig_getmethods__["bitfield_bit_size"] = GetBitfieldSizeInBits
8096 if _newclass: bitfield_bit_size = property(GetBitfieldSizeInBits, None, doc='''A read only property that returns the bitfield size in bits for this member as an integer, or zero if this member is not a bitfield.''')
8097
8098
8102
8103 SBTypeMember_swigregister = _lldb.SBTypeMember_swigregister
8104 SBTypeMember_swigregister(SBTypeMember)
8107 """
8108 Represents a data type in lldb. The FindFirstType() method of SBTarget/SBModule
8109 returns a SBType.
8110
8111 SBType supports the eq/ne operator. For example,
8112
8113 main.cpp:
8114
8115 class Task {
8116 public:
8117 int id;
8118 Task *next;
8119 Task(int i, Task *n):
8120 id(i),
8121 next(n)
8122 {}
8123 };
8124
8125 int main (int argc, char const *argv[])
8126 {
8127 Task *task_head = new Task(-1, NULL);
8128 Task *task1 = new Task(1, NULL);
8129 Task *task2 = new Task(2, NULL);
8130 Task *task3 = new Task(3, NULL); // Orphaned.
8131 Task *task4 = new Task(4, NULL);
8132 Task *task5 = new Task(5, NULL);
8133
8134 task_head->next = task1;
8135 task1->next = task2;
8136 task2->next = task4;
8137 task4->next = task5;
8138
8139 int total = 0;
8140 Task *t = task_head;
8141 while (t != NULL) {
8142 if (t->id >= 0)
8143 ++total;
8144 t = t->next;
8145 }
8146 printf('We have a total number of %d tasks\n', total);
8147
8148 // This corresponds to an empty task list.
8149 Task *empty_task_head = new Task(-1, NULL);
8150
8151 return 0; // Break at this line
8152 }
8153
8154 find_type.py:
8155
8156 # Get the type 'Task'.
8157 task_type = target.FindFirstType('Task')
8158 self.assertTrue(task_type)
8159
8160 # Get the variable 'task_head'.
8161 frame0.FindVariable('task_head')
8162 task_head_type = task_head.GetType()
8163 self.assertTrue(task_head_type.IsPointerType())
8164
8165 # task_head_type is 'Task *'.
8166 task_pointer_type = task_type.GetPointerType()
8167 self.assertTrue(task_head_type == task_pointer_type)
8168
8169 # Get the child mmember 'id' from 'task_head'.
8170 id = task_head.GetChildMemberWithName('id')
8171 id_type = id.GetType()
8172
8173 # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
8174 int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
8175 # id_type and int_type should be the same type!
8176 self.assertTrue(id_type == int_type)
8177
8178 ...
8179
8180 """
8181 __swig_setmethods__ = {}
8182 __setattr__ = lambda self, name, value: _swig_setattr(self, SBType, name, value)
8183 __swig_getmethods__ = {}
8184 __getattr__ = lambda self, name: _swig_getattr(self, SBType, name)
8185 __repr__ = _swig_repr
8187 - def __len__(self): return self.GetNumberChildren()
8191 """
8192 __init__(lldb::SBType self) -> SBType
8193 __init__(lldb::SBType self, SBType rhs) -> SBType
8194 """
8195 this = _lldb.new_SBType(*args)
8196 try: self.this.append(this)
8197 except: self.this = this
8198 __swig_destroy__ = _lldb.delete_SBType
8199 __del__ = lambda self : None;
8202 """IsValid(SBType self) -> bool"""
8203 return _lldb.SBType_IsValid(self)
8204
8206 """GetByteSize(SBType self) -> uint64_t"""
8207 return _lldb.SBType_GetByteSize(self)
8208
8212
8216
8220
8224
8228
8232
8236
8240
8244
8248
8250 """
8251 GetBasicType(SBType self) -> lldb::BasicType
8252 GetBasicType(SBType self, lldb::BasicType type) -> SBType
8253 """
8254 return _lldb.SBType_GetBasicType(self, *args)
8255
8259
8263
8267
8271
8275
8279
8281 """GetName(SBType self) -> str const *"""
8282 return _lldb.SBType_GetName(self)
8283
8285 """GetTypeClass(SBType self) -> lldb::TypeClass"""
8286 return _lldb.SBType_GetTypeClass(self)
8287
8291
8295
8299
8303
8307
8311
8320
8321 __swig_getmethods__["name"] = GetName
8322 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name for this type as a string.''')
8323
8324 __swig_getmethods__["size"] = GetByteSize
8325 if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns size in bytes for this type as an integer.''')
8326
8327 __swig_getmethods__["is_pointer"] = IsPointerType
8328 if _newclass: is_pointer = property(IsPointerType, None, doc='''A read only property that returns a boolean value that indicates if this type is a pointer type.''')
8329
8330 __swig_getmethods__["is_reference"] = IsReferenceType
8331 if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a reference type.''')
8332
8333 __swig_getmethods__["is_function"] = IsFunctionType
8334 if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a function type.''')
8335
8336 __swig_getmethods__["num_fields"] = GetNumberOfFields
8337 if _newclass: num_fields = property(GetNumberOfFields, None, doc='''A read only property that returns number of fields in this type as an integer.''')
8338
8339 __swig_getmethods__["num_bases"] = GetNumberOfDirectBaseClasses
8340 if _newclass: num_bases = property(GetNumberOfDirectBaseClasses, None, doc='''A read only property that returns number of direct base classes in this type as an integer.''')
8341
8342 __swig_getmethods__["num_vbases"] = GetNumberOfVirtualBaseClasses
8343 if _newclass: num_vbases = property(GetNumberOfVirtualBaseClasses, None, doc='''A read only property that returns number of virtual base classes in this type as an integer.''')
8344
8345 __swig_getmethods__["num_template_args"] = GetNumberOfTemplateArguments
8346 if _newclass: num_template_args = property(GetNumberOfTemplateArguments, None, doc='''A read only property that returns number of template arguments in this type as an integer.''')
8347
8348 __swig_getmethods__["template_args"] = template_arg_array
8349 if _newclass: template_args = property(template_arg_array, None, doc='''A read only property that returns a list() of lldb.SBType objects that represent all template arguments in this type.''')
8350
8351 __swig_getmethods__["type"] = GetTypeClass
8352 if _newclass: type = property(GetTypeClass, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eTypeClass") that represents a classification for this type.''')
8353
8354 __swig_getmethods__["is_complete"] = IsTypeComplete
8355 if _newclass: is_complete = property(IsTypeComplete, None, doc='''A read only property that returns a boolean value that indicates if this type is a complete type (True) or a forward declaration (False).''')
8356
8363
8370
8377
8415
8416 __swig_getmethods__["bases"] = get_bases_array
8417 if _newclass: bases = property(get_bases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the direct base classes for this type.''')
8418
8419 __swig_getmethods__["vbases"] = get_vbases_array
8420 if _newclass: vbases = property(get_vbases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the virtual base classes for this type.''')
8421
8422 __swig_getmethods__["fields"] = get_fields_array
8423 if _newclass: fields = property(get_fields_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the fields for this type.''')
8424
8425 __swig_getmethods__["members"] = get_members_array
8426 if _newclass: members = property(get_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeMember objects that represent all of the base classes, virtual base classes and fields for this type in ascending bit offset order.''')
8427
8428
8430 """__str__(SBType self) -> PyObject *"""
8431 return _lldb.SBType___str__(self)
8432
8433 SBType_swigregister = _lldb.SBType_swigregister
8434 SBType_swigregister(SBType)
8437 """
8438 Represents a list of SBTypes. The FindTypes() method of SBTarget/SBModule
8439 returns a SBTypeList.
8440
8441 SBTypeList supports SBType iteration. For example,
8442
8443 main.cpp:
8444
8445 class Task {
8446 public:
8447 int id;
8448 Task *next;
8449 Task(int i, Task *n):
8450 id(i),
8451 next(n)
8452 {}
8453 };
8454
8455 ...
8456
8457 find_type.py:
8458
8459 # Get the type 'Task'.
8460 type_list = target.FindTypes('Task')
8461 self.assertTrue(len(type_list) == 1)
8462 # To illustrate the SBType iteration.
8463 for type in type_list:
8464 # do something with type
8465
8466 ...
8467
8468 """
8469 __swig_setmethods__ = {}
8470 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTypeList, name, value)
8471 __swig_getmethods__ = {}
8472 __getattr__ = lambda self, name: _swig_getattr(self, SBTypeList, name)
8473 __repr__ = _swig_repr
8477 """__init__(lldb::SBTypeList self) -> SBTypeList"""
8478 this = _lldb.new_SBTypeList()
8479 try: self.this.append(this)
8480 except: self.this = this
8485
8489
8493
8495 """GetSize(SBTypeList self) -> uint32_t"""
8496 return _lldb.SBTypeList_GetSize(self)
8497
8498 __swig_destroy__ = _lldb.delete_SBTypeList
8499 __del__ = lambda self : None;
8500 SBTypeList_swigregister = _lldb.SBTypeList_swigregister
8501 SBTypeList_swigregister(SBTypeList)
8521 __swig_destroy__ = _lldb.delete_SBTypeCategory
8522 __del__ = lambda self : None;
8527
8531
8535
8539
8541 """GetDescription(SBTypeCategory self, SBStream description, lldb::DescriptionLevel description_level) -> bool"""
8542 return _lldb.SBTypeCategory_GetDescription(self, *args)
8543
8547
8551
8555
8559
8563
8567
8571
8575
8579
8583
8587
8591
8595
8599
8603
8607
8611
8615
8619
8623
8627
8631
8635
8639
8667
8671
8678
8682
8689
8693
8700
8704
8711
8712 __swig_getmethods__["formats"] = get_formats_array
8713 if _newclass: formats = property(get_formats_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFormat objects contained in this category''')
8714
8715 __swig_getmethods__["format"] = get_formats_access_object
8716 if _newclass: format = property(get_formats_access_object, None, doc=r'''A read only property that returns an object that you can use to look for formats by index or type name.''')
8717
8718 __swig_getmethods__["summaries"] = get_summaries_array
8719 if _newclass: summaries = property(get_summaries_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSummary objects contained in this category''')
8720
8721 __swig_getmethods__["summary"] = get_summaries_access_object
8722 if _newclass: summary = property(get_summaries_access_object, None, doc=r'''A read only property that returns an object that you can use to look for summaries by index or type name or regular expression.''')
8723
8724 __swig_getmethods__["filters"] = get_filters_array
8725 if _newclass: filters = property(get_filters_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFilter objects contained in this category''')
8726
8727 __swig_getmethods__["filter"] = get_filters_access_object
8728 if _newclass: filter = property(get_filters_access_object, None, doc=r'''A read only property that returns an object that you can use to look for filters by index or type name or regular expression.''')
8729
8730 __swig_getmethods__["synthetics"] = get_synthetics_array
8731 if _newclass: synthetics = property(get_synthetics_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSynthetic objects contained in this category''')
8732
8733 __swig_getmethods__["synthetic"] = get_synthetics_access_object
8734 if _newclass: synthetic = property(get_synthetics_access_object, None, doc=r'''A read only property that returns an object that you can use to look for synthetic children provider by index or type name or regular expression.''')
8735
8736 __swig_getmethods__["num_formats"] = GetNumFormats
8737 if _newclass: num_formats = property(GetNumFormats, None)
8738 __swig_getmethods__["num_summaries"] = GetNumSummaries
8739 if _newclass: num_summaries = property(GetNumSummaries, None)
8740 __swig_getmethods__["num_filters"] = GetNumFilters
8741 if _newclass: num_filters = property(GetNumFilters, None)
8742 __swig_getmethods__["num_synthetics"] = GetNumSynthetics
8743 if _newclass: num_synthetics = property(GetNumSynthetics, None)
8744
8745 __swig_getmethods__["name"] = GetName
8746 if _newclass: name = property(GetName, None)
8747
8748 __swig_getmethods__["enabled"] = GetEnabled
8749 __swig_setmethods__["enabled"] = SetEnabled
8750 if _newclass: enabled = property(GetEnabled, SetEnabled)
8751
8755
8756 SBTypeCategory_swigregister = _lldb.SBTypeCategory_swigregister
8757 SBTypeCategory_swigregister(SBTypeCategory)
8760 """
8761 Represents a filter that can be associated to one or more types.
8762
8763 """
8764 __swig_setmethods__ = {}
8765 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTypeFilter, name, value)
8766 __swig_getmethods__ = {}
8767 __getattr__ = lambda self, name: _swig_getattr(self, SBTypeFilter, name)
8768 __repr__ = _swig_repr
8770 """
8771 __init__(lldb::SBTypeFilter self) -> SBTypeFilter
8772 __init__(lldb::SBTypeFilter self, uint32_t options) -> SBTypeFilter
8773 __init__(lldb::SBTypeFilter self, SBTypeFilter rhs) -> SBTypeFilter
8774 """
8775 this = _lldb.new_SBTypeFilter(*args)
8776 try: self.this.append(this)
8777 except: self.this = this
8778 __swig_destroy__ = _lldb.delete_SBTypeFilter
8779 __del__ = lambda self : None;
8784
8788
8792
8796
8800
8804
8808
8812
8816
8818 """GetDescription(SBTypeFilter self, SBStream description, lldb::DescriptionLevel description_level) -> bool"""
8819 return _lldb.SBTypeFilter_GetDescription(self, *args)
8820
8824
8828
8829 __swig_getmethods__["options"] = GetOptions
8830 __swig_setmethods__["options"] = SetOptions
8831 if _newclass: options = property(GetOptions, SetOptions)
8832
8833 __swig_getmethods__["count"] = GetNumberOfExpressionPaths
8834 if _newclass: count = property(GetNumberOfExpressionPaths, None)
8835
8839
8841 if not isinstance(rhs, type(self)):
8842 return False
8843
8844 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
8845
8847 if not isinstance(rhs, type(self)):
8848 return True
8849
8850 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
8851
8852 SBTypeFilter_swigregister = _lldb.SBTypeFilter_swigregister
8853 SBTypeFilter_swigregister(SBTypeFilter)
8875 __swig_destroy__ = _lldb.delete_SBTypeFormat
8876 __del__ = lambda self : None;
8881
8885
8889
8893
8897
8901
8905
8909
8913
8914 __swig_getmethods__["format"] = GetFormat
8915 __swig_setmethods__["format"] = SetFormat
8916 if _newclass: format = property(GetFormat, SetFormat)
8917
8918 __swig_getmethods__["options"] = GetOptions
8919 __swig_setmethods__["options"] = SetOptions
8920 if _newclass: options = property(GetOptions, SetOptions)
8921
8925
8926 SBTypeFormat_swigregister = _lldb.SBTypeFormat_swigregister
8927 SBTypeFormat_swigregister(SBTypeFormat)
8930 """
8931 Represents a general way to provide a type name to LLDB APIs.
8932
8933 """
8934 __swig_setmethods__ = {}
8935 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTypeNameSpecifier, name, value)
8936 __swig_getmethods__ = {}
8937 __getattr__ = lambda self, name: _swig_getattr(self, SBTypeNameSpecifier, name)
8938 __repr__ = _swig_repr
8940 """
8941 __init__(lldb::SBTypeNameSpecifier self) -> SBTypeNameSpecifier
8942 __init__(lldb::SBTypeNameSpecifier self, str const * name, bool is_regex=False) -> SBTypeNameSpecifier
8943 __init__(lldb::SBTypeNameSpecifier self, str const * name) -> SBTypeNameSpecifier
8944 __init__(lldb::SBTypeNameSpecifier self, SBType type) -> SBTypeNameSpecifier
8945 __init__(lldb::SBTypeNameSpecifier self, SBTypeNameSpecifier rhs) -> SBTypeNameSpecifier
8946 """
8947 this = _lldb.new_SBTypeNameSpecifier(*args)
8948 try: self.this.append(this)
8949 except: self.this = this
8950 __swig_destroy__ = _lldb.delete_SBTypeNameSpecifier
8951 __del__ = lambda self : None;
8956
8960
8964
8968
8972
8976
8980
8984
8985 __swig_getmethods__["name"] = GetName
8986 if _newclass: name = property(GetName, None)
8987
8988 __swig_getmethods__["is_regex"] = IsRegex
8989 if _newclass: is_regex = property(IsRegex, None)
8990
8994
8996 if not isinstance(rhs, type(self)):
8997 return False
8998
8999 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
9000
9002 if not isinstance(rhs, type(self)):
9003 return True
9004
9005 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
9006
9007 SBTypeNameSpecifier_swigregister = _lldb.SBTypeNameSpecifier_swigregister
9008 SBTypeNameSpecifier_swigregister(SBTypeNameSpecifier)
9011 """
9012 Represents a summary that can be associated to one or more types.
9013
9014 """
9015 __swig_setmethods__ = {}
9016 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTypeSummary, name, value)
9017 __swig_getmethods__ = {}
9018 __getattr__ = lambda self, name: _swig_getattr(self, SBTypeSummary, name)
9019 __repr__ = _swig_repr
9021 """
9022 CreateWithSummaryString(str const * data, uint32_t options=0) -> SBTypeSummary
9023 CreateWithSummaryString(str const * data) -> SBTypeSummary
9024 """
9025 return _lldb.SBTypeSummary_CreateWithSummaryString(*args)
9026
9027 if _newclass:CreateWithSummaryString = staticmethod(CreateWithSummaryString)
9028 __swig_getmethods__["CreateWithSummaryString"] = lambda x: CreateWithSummaryString
9030 """
9031 CreateWithFunctionName(str const * data, uint32_t options=0) -> SBTypeSummary
9032 CreateWithFunctionName(str const * data) -> SBTypeSummary
9033 """
9034 return _lldb.SBTypeSummary_CreateWithFunctionName(*args)
9035
9036 if _newclass:CreateWithFunctionName = staticmethod(CreateWithFunctionName)
9037 __swig_getmethods__["CreateWithFunctionName"] = lambda x: CreateWithFunctionName
9039 """
9040 CreateWithScriptCode(str const * data, uint32_t options=0) -> SBTypeSummary
9041 CreateWithScriptCode(str const * data) -> SBTypeSummary
9042 """
9043 return _lldb.SBTypeSummary_CreateWithScriptCode(*args)
9044
9045 if _newclass:CreateWithScriptCode = staticmethod(CreateWithScriptCode)
9046 __swig_getmethods__["CreateWithScriptCode"] = lambda x: CreateWithScriptCode
9048 """
9049 __init__(lldb::SBTypeSummary self) -> SBTypeSummary
9050 __init__(lldb::SBTypeSummary self, SBTypeSummary rhs) -> SBTypeSummary
9051 """
9052 this = _lldb.new_SBTypeSummary(*args)
9053 try: self.this.append(this)
9054 except: self.this = this
9055 __swig_destroy__ = _lldb.delete_SBTypeSummary
9056 __del__ = lambda self : None;
9061
9065
9069
9073
9077
9081
9085
9089
9093
9097
9101
9103 """GetDescription(SBTypeSummary self, SBStream description, lldb::DescriptionLevel description_level) -> bool"""
9104 return _lldb.SBTypeSummary_GetDescription(self, *args)
9105
9109
9113
9114 __swig_getmethods__["options"] = GetOptions
9115 __swig_setmethods__["options"] = SetOptions
9116 if _newclass: options = property(GetOptions, SetOptions)
9117
9118 __swig_getmethods__["is_summary_string"] = IsSummaryString
9119 if _newclass: is_summary_string = property(IsSummaryString, None)
9120
9121 __swig_getmethods__["is_function_name"] = IsFunctionName
9122 if _newclass: is_function_name = property(IsFunctionName, None)
9123
9124 __swig_getmethods__["is_function_name"] = IsFunctionCode
9125 if _newclass: is_function_name = property(IsFunctionCode, None)
9126
9127 __swig_getmethods__["summary_data"] = GetData
9128 if _newclass: summary_data = property(GetData, None)
9129
9133
9135 if not isinstance(rhs, type(self)):
9136 return False
9137
9138 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
9139
9141 if not isinstance(rhs, type(self)):
9142 return True
9143
9144 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
9145
9146 SBTypeSummary_swigregister = _lldb.SBTypeSummary_swigregister
9147 SBTypeSummary_swigregister(SBTypeSummary)
9150 """
9151 CreateWithSummaryString(char const * data, uint32_t options=0) -> SBTypeSummary
9152 SBTypeSummary_CreateWithSummaryString(char const * data) -> SBTypeSummary
9153 """
9154 return _lldb.SBTypeSummary_CreateWithSummaryString(*args)
9155
9157 """
9158 CreateWithFunctionName(char const * data, uint32_t options=0) -> SBTypeSummary
9159 SBTypeSummary_CreateWithFunctionName(char const * data) -> SBTypeSummary
9160 """
9161 return _lldb.SBTypeSummary_CreateWithFunctionName(*args)
9162
9164 """
9165 CreateWithScriptCode(char const * data, uint32_t options=0) -> SBTypeSummary
9166 SBTypeSummary_CreateWithScriptCode(char const * data) -> SBTypeSummary
9167 """
9168 return _lldb.SBTypeSummary_CreateWithScriptCode(*args)
9169
9171 """
9172 Represents a summary that can be associated to one or more types.
9173
9174 """
9175 __swig_setmethods__ = {}
9176 __setattr__ = lambda self, name, value: _swig_setattr(self, SBTypeSynthetic, name, value)
9177 __swig_getmethods__ = {}
9178 __getattr__ = lambda self, name: _swig_getattr(self, SBTypeSynthetic, name)
9179 __repr__ = _swig_repr
9181 """
9182 CreateWithClassName(str const * data, uint32_t options=0) -> SBTypeSynthetic
9183 CreateWithClassName(str const * data) -> SBTypeSynthetic
9184 """
9185 return _lldb.SBTypeSynthetic_CreateWithClassName(*args)
9186
9187 if _newclass:CreateWithClassName = staticmethod(CreateWithClassName)
9188 __swig_getmethods__["CreateWithClassName"] = lambda x: CreateWithClassName
9190 """
9191 CreateWithScriptCode(str const * data, uint32_t options=0) -> SBTypeSynthetic
9192 CreateWithScriptCode(str const * data) -> SBTypeSynthetic
9193 """
9194 return _lldb.SBTypeSynthetic_CreateWithScriptCode(*args)
9195
9196 if _newclass:CreateWithScriptCode = staticmethod(CreateWithScriptCode)
9197 __swig_getmethods__["CreateWithScriptCode"] = lambda x: CreateWithScriptCode
9199 """
9200 __init__(lldb::SBTypeSynthetic self) -> SBTypeSynthetic
9201 __init__(lldb::SBTypeSynthetic self, SBTypeSynthetic rhs) -> SBTypeSynthetic
9202 """
9203 this = _lldb.new_SBTypeSynthetic(*args)
9204 try: self.this.append(this)
9205 except: self.this = this
9206 __swig_destroy__ = _lldb.delete_SBTypeSynthetic
9207 __del__ = lambda self : None;
9212
9216
9220
9224
9228
9232
9236
9240
9242 """GetDescription(SBTypeSynthetic self, SBStream description, lldb::DescriptionLevel description_level) -> bool"""
9243 return _lldb.SBTypeSynthetic_GetDescription(self, *args)
9244
9248
9252
9253 __swig_getmethods__["options"] = GetOptions
9254 __swig_setmethods__["options"] = SetOptions
9255 if _newclass: options = property(GetOptions, SetOptions)
9256
9257 __swig_getmethods__["contains_code"] = IsClassCode
9258 if _newclass: contains_code = property(IsClassCode, None)
9259
9260 __swig_getmethods__["synthetic_data"] = GetData
9261 if _newclass: synthetic_data = property(GetData, None)
9262
9266
9268 if not isinstance(rhs, type(self)):
9269 return False
9270
9271 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
9272
9274 if not isinstance(rhs, type(self)):
9275 return True
9276
9277 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
9278
9279 SBTypeSynthetic_swigregister = _lldb.SBTypeSynthetic_swigregister
9280 SBTypeSynthetic_swigregister(SBTypeSynthetic)
9283 """
9284 CreateWithClassName(char const * data, uint32_t options=0) -> SBTypeSynthetic
9285 SBTypeSynthetic_CreateWithClassName(char const * data) -> SBTypeSynthetic
9286 """
9287 return _lldb.SBTypeSynthetic_CreateWithClassName(*args)
9288
9290 """
9291 CreateWithScriptCode(char const * data, uint32_t options=0) -> SBTypeSynthetic
9292 SBTypeSynthetic_CreateWithScriptCode(char const * data) -> SBTypeSynthetic
9293 """
9294 return _lldb.SBTypeSynthetic_CreateWithScriptCode(*args)
9295
9297 """
9298 Represents the value of a variable, a register, or an expression.
9299
9300 SBValue supports iteration through its child, which in turn is represented
9301 as an SBValue. For example, we can get the general purpose registers of a
9302 frame as an SBValue, and iterate through all the registers,
9303
9304 registerSet = frame.GetRegisters() # Returns an SBValueList.
9305 for regs in registerSet:
9306 if 'general purpose registers' in regs.getName().lower():
9307 GPRs = regs
9308 break
9309
9310 print '%s (number of children = %d):' % (GPRs.GetName(), GPRs.GetNumChildren())
9311 for reg in GPRs:
9312 print 'Name: ', reg.GetName(), ' Value: ', reg.GetValue()
9313
9314 produces the output:
9315
9316 General Purpose Registers (number of children = 21):
9317 Name: rax Value: 0x0000000100000c5c
9318 Name: rbx Value: 0x0000000000000000
9319 Name: rcx Value: 0x00007fff5fbffec0
9320 Name: rdx Value: 0x00007fff5fbffeb8
9321 Name: rdi Value: 0x0000000000000001
9322 Name: rsi Value: 0x00007fff5fbffea8
9323 Name: rbp Value: 0x00007fff5fbffe80
9324 Name: rsp Value: 0x00007fff5fbffe60
9325 Name: r8 Value: 0x0000000008668682
9326 Name: r9 Value: 0x0000000000000000
9327 Name: r10 Value: 0x0000000000001200
9328 Name: r11 Value: 0x0000000000000206
9329 Name: r12 Value: 0x0000000000000000
9330 Name: r13 Value: 0x0000000000000000
9331 Name: r14 Value: 0x0000000000000000
9332 Name: r15 Value: 0x0000000000000000
9333 Name: rip Value: 0x0000000100000dae
9334 Name: rflags Value: 0x0000000000000206
9335 Name: cs Value: 0x0000000000000027
9336 Name: fs Value: 0x0000000000000010
9337 Name: gs Value: 0x0000000000000048
9338
9339 See also linked_list_iter() for another perspective on how to iterate through an
9340 SBValue instance which interprets the value object as representing the head of a
9341 linked list.
9342 """
9343 __swig_setmethods__ = {}
9344 __setattr__ = lambda self, name, value: _swig_setattr(self, SBValue, name, value)
9345 __swig_getmethods__ = {}
9346 __getattr__ = lambda self, name: _swig_getattr(self, SBValue, name)
9347 __repr__ = _swig_repr
9350
9352 """Default function for end of list test takes an SBValue object.
9353
9354 Return True if val is invalid or it corresponds to a null pointer.
9355 Otherwise, return False.
9356 """
9357 if not val or val.GetValueAsUnsigned() == 0:
9358 return True
9359 else:
9360 return False
9361
9362
9363
9364
9366 """Generator adaptor to support iteration for SBValue as a linked list.
9367
9368 linked_list_iter() is a special purpose iterator to treat the SBValue as
9369 the head of a list data structure, where you specify the child member
9370 name which points to the next item on the list and you specify the
9371 end-of-list test function which takes an SBValue for an item and returns
9372 True if EOL is reached and False if not.
9373
9374 linked_list_iter() also detects infinite loop and bails out early.
9375
9376 The end_of_list_test arg, if omitted, defaults to the __eol_test__
9377 function above.
9378
9379 For example,
9380
9381 # Get Frame #0.
9382 ...
9383
9384 # Get variable 'task_head'.
9385 task_head = frame0.FindVariable('task_head')
9386 ...
9387
9388 for t in task_head.linked_list_iter('next'):
9389 print t
9390 """
9391 if end_of_list_test(self):
9392 return
9393 item = self
9394 visited = set()
9395 try:
9396 while not end_of_list_test(item) and not item.GetValueAsUnsigned() in visited:
9397 visited.add(item.GetValueAsUnsigned())
9398 yield item
9399
9400 item = item.GetChildMemberWithName(next_item_name)
9401 except:
9402
9403 pass
9404
9405 return
9406
9408 """
9409 __init__(lldb::SBValue self) -> SBValue
9410 __init__(lldb::SBValue self, SBValue rhs) -> SBValue
9411 """
9412 this = _lldb.new_SBValue(*args)
9413 try: self.this.append(this)
9414 except: self.this = this
9415 __swig_destroy__ = _lldb.delete_SBValue
9416 __del__ = lambda self : None;
9419 """IsValid(SBValue self) -> bool"""
9420 return _lldb.SBValue_IsValid(self)
9421
9423 """Clear(SBValue self)"""
9424 return _lldb.SBValue_Clear(self)
9425
9427 """GetError(SBValue self) -> SBError"""
9428 return _lldb.SBValue_GetError(self)
9429
9431 """GetID(SBValue self) -> lldb::user_id_t"""
9432 return _lldb.SBValue_GetID(self)
9433
9435 """GetName(SBValue self) -> str const *"""
9436 return _lldb.SBValue_GetName(self)
9437
9439 """GetTypeName(SBValue self) -> str const *"""
9440 return _lldb.SBValue_GetTypeName(self)
9441
9445
9449
9453
9457
9459 """GetValue(SBValue self) -> str const *"""
9460 return _lldb.SBValue_GetValue(self)
9461
9463 """
9464 GetValueAsSigned(SBValue self, SBError error, int64_t fail_value=0) -> int64_t
9465 GetValueAsSigned(SBValue self, SBError error) -> int64_t
9466 GetValueAsSigned(SBValue self, int64_t fail_value=0) -> int64_t
9467 GetValueAsSigned(SBValue self) -> int64_t
9468 """
9469 return _lldb.SBValue_GetValueAsSigned(self, *args)
9470
9472 """
9473 GetValueAsUnsigned(SBValue self, SBError error, uint64_t fail_value=0) -> uint64_t
9474 GetValueAsUnsigned(SBValue self, SBError error) -> uint64_t
9475 GetValueAsUnsigned(SBValue self, uint64_t fail_value=0) -> uint64_t
9476 GetValueAsUnsigned(SBValue self) -> uint64_t
9477 """
9478 return _lldb.SBValue_GetValueAsUnsigned(self, *args)
9479
9481 """GetValueType(SBValue self) -> lldb::ValueType"""
9482 return _lldb.SBValue_GetValueType(self)
9483
9487
9489 """GetSummary(SBValue self) -> str const *"""
9490 return _lldb.SBValue_GetSummary(self)
9491
9495
9497 """GetDynamicValue(SBValue self, lldb::DynamicValueType use_dynamic) -> SBValue"""
9498 return _lldb.SBValue_GetDynamicValue(self, *args)
9499
9503
9507
9511
9515
9519
9523
9527
9531
9533 """GetLocation(SBValue self) -> str const *"""
9534 return _lldb.SBValue_GetLocation(self)
9535
9537 """
9538 SetValueFromCString(SBValue self, str const * value_str) -> bool
9539 SetValueFromCString(SBValue self, str const * value_str, SBError error) -> bool
9540 """
9541 return _lldb.SBValue_SetValueFromCString(self, *args)
9542
9546
9550
9554
9558
9560 """
9561 GetChildAtIndex(SBValue self, uint32_t idx) -> SBValue
9562 GetChildAtIndex(SBValue self, uint32_t idx, lldb::DynamicValueType use_dynamic, bool can_create_synthetic) -> SBValue
9563
9564 Get a child value by index from a value.
9565
9566 Structs, unions, classes, arrays and and pointers have child
9567 values that can be access by index.
9568
9569 Structs and unions access child members using a zero based index
9570 for each child member. For
9571
9572 Classes reserve the first indexes for base classes that have
9573 members (empty base classes are omitted), and all members of the
9574 current class will then follow the base classes.
9575
9576 Pointers differ depending on what they point to. If the pointer
9577 points to a simple type, the child at index zero
9578 is the only child value available, unless synthetic_allowed
9579 is true, in which case the pointer will be used as an array
9580 and can create 'synthetic' child values using positive or
9581 negative indexes. If the pointer points to an aggregate type
9582 (an array, class, union, struct), then the pointee is
9583 transparently skipped and any children are going to be the indexes
9584 of the child values within the aggregate type. For example if
9585 we have a 'Point' type and we have a SBValue that contains a
9586 pointer to a 'Point' type, then the child at index zero will be
9587 the 'x' member, and the child at index 1 will be the 'y' member
9588 (the child at index zero won't be a 'Point' instance).
9589
9590 Arrays have a preset number of children that can be accessed by
9591 index and will returns invalid child values for indexes that are
9592 out of bounds unless the synthetic_allowed is true. In this
9593 case the array can create 'synthetic' child values for indexes
9594 that aren't in the array bounds using positive or negative
9595 indexes.
9596
9597 @param[in] idx
9598 The index of the child value to get
9599
9600 @param[in] use_dynamic
9601 An enumeration that specifies wether to get dynamic values,
9602 and also if the target can be run to figure out the dynamic
9603 type of the child value.
9604
9605 @param[in] synthetic_allowed
9606 If true, then allow child values to be created by index
9607 for pointers and arrays for indexes that normally wouldn't
9608 be allowed.
9609
9610 @return
9611 A new SBValue object that represents the child member value.
9612 """
9613 return _lldb.SBValue_GetChildAtIndex(self, *args)
9614
9616 """CreateChildAtOffset(SBValue self, str const * name, uint32_t offset, SBType type) -> SBValue"""
9617 return _lldb.SBValue_CreateChildAtOffset(self, *args)
9618
9619 - def Cast(self, *args):
9620 """Cast(SBValue self, SBType type) -> SBValue"""
9621 return _lldb.SBValue_Cast(self, *args)
9622
9624 """
9625 CreateValueFromExpression(SBValue self, str const * name, str const * expression) -> SBValue
9626 CreateValueFromExpression(SBValue self, str const * name, str const * expression, SBExpressionOptions options) -> SBValue
9627 """
9628 return _lldb.SBValue_CreateValueFromExpression(self, *args)
9629
9631 """CreateValueFromAddress(SBValue self, str const * name, lldb::addr_t address, SBType type) -> SBValue"""
9632 return _lldb.SBValue_CreateValueFromAddress(self, *args)
9633
9635 """CreateValueFromData(SBValue self, str const * name, SBData data, SBType type) -> SBValue"""
9636 return _lldb.SBValue_CreateValueFromData(self, *args)
9637
9639 """GetType(SBValue self) -> SBType"""
9640 return _lldb.SBValue_GetType(self)
9641
9643 """
9644 GetIndexOfChildWithName(SBValue self, str const * name) -> uint32_t
9645
9646 Returns the child member index.
9647
9648 Matches children of this object only and will match base classes and
9649 member names if this is a clang typed object.
9650
9651 @param[in] name
9652 The name of the child value to get
9653
9654 @return
9655 An index to the child member value.
9656 """
9657 return _lldb.SBValue_GetIndexOfChildWithName(self, *args)
9658
9660 """
9661 GetChildMemberWithName(SBValue self, str const * name) -> SBValue
9662 GetChildMemberWithName(SBValue self, str const * name, lldb::DynamicValueType use_dynamic) -> SBValue
9663
9664 Returns the child member value.
9665
9666 Matches child members of this object and child members of any base
9667 classes.
9668
9669 @param[in] name
9670 The name of the child value to get
9671
9672 @param[in] use_dynamic
9673 An enumeration that specifies wether to get dynamic values,
9674 and also if the target can be run to figure out the dynamic
9675 type of the child value.
9676
9677 @return
9678 A new SBValue object that represents the child member value.
9679 """
9680 return _lldb.SBValue_GetChildMemberWithName(self, *args)
9681
9683 """
9684 GetValueForExpressionPath(SBValue self, str const * expr_path) -> SBValue
9685
9686 Expands nested expressions like .a->b[0].c[1]->d.
9687 """
9688 return _lldb.SBValue_GetValueForExpressionPath(self, *args)
9689
9693
9697
9701
9705
9709
9711 """AddressOf(SBValue self) -> SBValue"""
9712 return _lldb.SBValue_AddressOf(self)
9713
9717
9719 """GetTarget(SBValue self) -> SBTarget"""
9720 return _lldb.SBValue_GetTarget(self)
9721
9723 """GetProcess(SBValue self) -> SBProcess"""
9724 return _lldb.SBValue_GetProcess(self)
9725
9727 """GetThread(SBValue self) -> SBThread"""
9728 return _lldb.SBValue_GetThread(self)
9729
9731 """GetFrame(SBValue self) -> SBFrame"""
9732 return _lldb.SBValue_GetFrame(self)
9733
9734 - def Watch(self, *args):
9735 """
9736 Watch(SBValue self, bool resolve_location, bool read, bool write, SBError error) -> SBWatchpoint
9737
9738 Find and watch a variable.
9739 It returns an SBWatchpoint, which may be invalid.
9740 """
9741 return _lldb.SBValue_Watch(self, *args)
9742
9744 """
9745 WatchPointee(SBValue self, bool resolve_location, bool read, bool write, SBError error) -> SBWatchpoint
9746
9747 Find and watch the location pointed to by a variable.
9748 It returns an SBWatchpoint, which may be invalid.
9749 """
9750 return _lldb.SBValue_WatchPointee(self, *args)
9751
9755
9757 """
9758 GetPointeeData(SBValue self, uint32_t item_idx=0, uint32_t item_count=1) -> SBData
9759 GetPointeeData(SBValue self, uint32_t item_idx=0) -> SBData
9760 GetPointeeData(SBValue self) -> SBData
9761
9762 Get an SBData wrapping what this SBValue points to.
9763
9764 This method will dereference the current SBValue, if its
9765 data type is a T* or T[], and extract item_count elements
9766 of type T from it, copying their contents in an SBData.
9767
9768 @param[in] item_idx
9769 The index of the first item to retrieve. For an array
9770 this is equivalent to array[item_idx], for a pointer
9771 to *(pointer + item_idx). In either case, the measurement
9772 unit for item_idx is the sizeof(T) rather than the byte
9773
9774 @param[in] item_count
9775 How many items should be copied into the output. By default
9776 only one item is copied, but more can be asked for.
9777
9778 @return
9779 An SBData with the contents of the copied items, on success.
9780 An empty SBData otherwise.
9781 """
9782 return _lldb.SBValue_GetPointeeData(self, item_idx, item_count)
9783
9785 """
9786 GetData(SBValue self) -> SBData
9787
9788 Get an SBData wrapping the contents of this SBValue.
9789
9790 This method will read the contents of this object in memory
9791 and copy them into an SBData for future use.
9792
9793 @return
9794 An SBData with the contents of this SBValue, on success.
9795 An empty SBData otherwise.
9796 """
9797 return _lldb.SBValue_GetData(self)
9798
9800 """SetData(SBValue self, SBData data, SBError error) -> bool"""
9801 return _lldb.SBValue_SetData(self, *args)
9802
9806
9808 """GetAddress(SBValue self) -> SBAddress"""
9809 return _lldb.SBValue_GetAddress(self)
9810
9812 """
9813 GetExpressionPath(SBValue self, SBStream description) -> bool
9814 GetExpressionPath(SBValue self, SBStream description, bool qualify_cxx_base_classes) -> bool
9815
9816 Returns an expression path for this value.
9817 """
9818 return _lldb.SBValue_GetExpressionPath(self, *args)
9819
9823
9824 __swig_getmethods__["name"] = GetName
9825 if _newclass: name = property(GetName, None, doc='''A read only property that returns the name of this value as a string.''')
9826
9827 __swig_getmethods__["type"] = GetType
9828 if _newclass: type = property(GetType, None, doc='''A read only property that returns a lldb.SBType object that represents the type for this value.''')
9829
9830 __swig_getmethods__["size"] = GetByteSize
9831 if _newclass: size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this value.''')
9832
9833 __swig_getmethods__["is_in_scope"] = IsInScope
9834 if _newclass: is_in_scope = property(IsInScope, None, doc='''A read only property that returns a boolean value that indicates whether this value is currently lexically in scope.''')
9835
9836 __swig_getmethods__["format"] = GetFormat
9837 __swig_setmethods__["format"] = SetFormat
9838 if _newclass: format = property(GetName, SetFormat, doc='''A read/write property that gets/sets the format used for lldb.SBValue().GetValue() for this value. See enumerations that start with "lldb.eFormat".''')
9839
9840 __swig_getmethods__["value"] = GetValue
9841 __swig_setmethods__["value"] = SetValueFromCString
9842 if _newclass: value = property(GetValue, SetValueFromCString, doc='''A read/write property that gets/sets value from a string.''')
9843
9844 __swig_getmethods__["value_type"] = GetValueType
9845 if _newclass: value_type = property(GetValueType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eValueType") that represents the type of this value (local, argument, global, register, etc.).''')
9846
9847 __swig_getmethods__["changed"] = GetValueDidChange
9848 if _newclass: changed = property(GetValueDidChange, None, doc='''A read only property that returns a boolean value that indicates if this value has changed since it was last updated.''')
9849
9850 __swig_getmethods__["data"] = GetData
9851 if _newclass: data = property(GetData, None, doc='''A read only property that returns an lldb object (lldb.SBData) that represents the bytes that make up the value for this object.''')
9852
9853 __swig_getmethods__["load_addr"] = GetLoadAddress
9854 if _newclass: load_addr = property(GetLoadAddress, None, doc='''A read only property that returns the load address of this value as an integer.''')
9855
9856 __swig_getmethods__["addr"] = GetAddress
9857 if _newclass: addr = property(GetAddress, None, doc='''A read only property that returns an lldb.SBAddress that represents the address of this value if it is in memory.''')
9858
9859 __swig_getmethods__["deref"] = Dereference
9860 if _newclass: deref = property(Dereference, None, doc='''A read only property that returns an lldb.SBValue that is created by dereferencing this value.''')
9861
9862 __swig_getmethods__["address_of"] = AddressOf
9863 if _newclass: address_of = property(AddressOf, None, doc='''A read only property that returns an lldb.SBValue that represents the address-of this value.''')
9864
9865 __swig_getmethods__["error"] = GetError
9866 if _newclass: error = property(GetError, None, doc='''A read only property that returns the lldb.SBError that represents the error from the last time the variable value was calculated.''')
9867
9868 __swig_getmethods__["summary"] = GetSummary
9869 if _newclass: summary = property(GetSummary, None, doc='''A read only property that returns the summary for this value as a string''')
9870
9871 __swig_getmethods__["description"] = GetObjectDescription
9872 if _newclass: description = property(GetObjectDescription, None, doc='''A read only property that returns the language-specific description of this value as a string''')
9873
9874 __swig_getmethods__["dynamic"] = __get_dynamic__
9875 if _newclass: dynamic = property(__get_dynamic__, None, doc='''A read only property that returns an lldb.SBValue that is created by finding the dynamic type of this value.''')
9876
9877 __swig_getmethods__["location"] = GetLocation
9878 if _newclass: location = property(GetLocation, None, doc='''A read only property that returns the location of this value as a string.''')
9879
9880 __swig_getmethods__["target"] = GetTarget
9881 if _newclass: target = property(GetTarget, None, doc='''A read only property that returns the lldb.SBTarget that this value is associated with.''')
9882
9883 __swig_getmethods__["process"] = GetProcess
9884 if _newclass: process = property(GetProcess, None, doc='''A read only property that returns the lldb.SBProcess that this value is associated with, the returned value might be invalid and should be tested.''')
9885
9886 __swig_getmethods__["thread"] = GetThread
9887 if _newclass: thread = property(GetThread, None, doc='''A read only property that returns the lldb.SBThread that this value is associated with, the returned value might be invalid and should be tested.''')
9888
9889 __swig_getmethods__["frame"] = GetFrame
9890 if _newclass: frame = property(GetFrame, None, doc='''A read only property that returns the lldb.SBFrame that this value is associated with, the returned value might be invalid and should be tested.''')
9891
9892 __swig_getmethods__["num_children"] = GetNumChildren
9893 if _newclass: num_children = property(GetNumChildren, None, doc='''A read only property that returns the number of child lldb.SBValues that this value has.''')
9894
9895 __swig_getmethods__["unsigned"] = GetValueAsUnsigned
9896 if _newclass: unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this SBValue as an usigned integer.''')
9897
9898 __swig_getmethods__["signed"] = GetValueAsSigned
9899 if _newclass: signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this SBValue as a signed integer.''')
9900
9905
9906 __swig_getmethods__["path"] = get_expr_path
9907 if _newclass: path = property(get_expr_path, None, doc='''A read only property that returns the expression path that one can use to reach this value in an expression.''')
9908
9910 """__str__(SBValue self) -> PyObject *"""
9911 return _lldb.SBValue___str__(self)
9912
9913 SBValue_swigregister = _lldb.SBValue_swigregister
9914 SBValue_swigregister(SBValue)
9917 """
9918 Represents a collection of SBValues. Both SBFrame's GetVariables() and
9919 GetRegisters() return a SBValueList.
9920
9921 SBValueList supports SBValue iteration. For example (from test/lldbutil.py),
9922
9923 def get_registers(frame, kind):
9924 '''Returns the registers given the frame and the kind of registers desired.
9925
9926 Returns None if there's no such kind.
9927 '''
9928 registerSet = frame.GetRegisters() # Return type of SBValueList.
9929 for value in registerSet:
9930 if kind.lower() in value.GetName().lower():
9931 return value
9932
9933 return None
9934
9935 def get_GPRs(frame):
9936 '''Returns the general purpose registers of the frame as an SBValue.
9937
9938 The returned SBValue object is iterable. An example:
9939 ...
9940 from lldbutil import get_GPRs
9941 regs = get_GPRs(frame)
9942 for reg in regs:
9943 print '%s => %s' % (reg.GetName(), reg.GetValue())
9944 ...
9945 '''
9946 return get_registers(frame, 'general purpose')
9947
9948 def get_FPRs(frame):
9949 '''Returns the floating point registers of the frame as an SBValue.
9950
9951 The returned SBValue object is iterable. An example:
9952 ...
9953 from lldbutil import get_FPRs
9954 regs = get_FPRs(frame)
9955 for reg in regs:
9956 print '%s => %s' % (reg.GetName(), reg.GetValue())
9957 ...
9958 '''
9959 return get_registers(frame, 'floating point')
9960
9961 def get_ESRs(frame):
9962 '''Returns the exception state registers of the frame as an SBValue.
9963
9964 The returned SBValue object is iterable. An example:
9965 ...
9966 from lldbutil import get_ESRs
9967 regs = get_ESRs(frame)
9968 for reg in regs:
9969 print '%s => %s' % (reg.GetName(), reg.GetValue())
9970 ...
9971 '''
9972 return get_registers(frame, 'exception state')
9973 """
9974 __swig_setmethods__ = {}
9975 __setattr__ = lambda self, name, value: _swig_setattr(self, SBValueList, name, value)
9976 __swig_getmethods__ = {}
9977 __getattr__ = lambda self, name: _swig_getattr(self, SBValueList, name)
9978 __repr__ = _swig_repr
9982 """
9983 __init__(lldb::SBValueList self) -> SBValueList
9984 __init__(lldb::SBValueList self, SBValueList rhs) -> SBValueList
9985 """
9986 this = _lldb.new_SBValueList(*args)
9987 try: self.this.append(this)
9988 except: self.this = this
9989 __swig_destroy__ = _lldb.delete_SBValueList
9990 __del__ = lambda self : None;
9995
9999
10001 """
10002 Append(SBValueList self, SBValue val_obj)
10003 Append(SBValueList self, SBValueList value_list)
10004 """
10005 return _lldb.SBValueList_Append(self, *args)
10006
10010
10014
10018
10021
10051
10052
10054 """__str__(SBValueList self) -> PyObject *"""
10055 return _lldb.SBValueList___str__(self)
10056
10057 SBValueList_swigregister = _lldb.SBValueList_swigregister
10058 SBValueList_swigregister(SBValueList)
10061 """
10062 Represents an instance of watchpoint for a specific target program.
10063
10064 A watchpoint is determined by the address and the byte size that resulted in
10065 this particular instantiation. Each watchpoint has its settable options.
10066
10067 See also SBTarget.watchpoint_iter() for example usage of iterating through the
10068 watchpoints of the target.
10069 """
10070 __swig_setmethods__ = {}
10071 __setattr__ = lambda self, name, value: _swig_setattr(self, SBWatchpoint, name, value)
10072 __swig_getmethods__ = {}
10073 __getattr__ = lambda self, name: _swig_getattr(self, SBWatchpoint, name)
10074 __repr__ = _swig_repr
10078 """
10079 __init__(lldb::SBWatchpoint self) -> SBWatchpoint
10080 __init__(lldb::SBWatchpoint self, SBWatchpoint rhs) -> SBWatchpoint
10081 """
10082 this = _lldb.new_SBWatchpoint(*args)
10083 try: self.this.append(this)
10084 except: self.this = this
10085 __swig_destroy__ = _lldb.delete_SBWatchpoint
10086 __del__ = lambda self : None;
10091
10095
10097 """GetID(SBWatchpoint self) -> lldb::watch_id_t"""
10098 return _lldb.SBWatchpoint_GetID(self)
10099
10101 """
10102 GetHardwareIndex(SBWatchpoint self) -> int32_t
10103
10104 With -1 representing an invalid hardware index.
10105 """
10106 return _lldb.SBWatchpoint_GetHardwareIndex(self)
10107
10111
10115
10119
10123
10127
10131
10135
10137 """
10138 GetCondition(SBWatchpoint self) -> str const *
10139
10140 Get the condition expression for the watchpoint.
10141 """
10142 return _lldb.SBWatchpoint_GetCondition(self)
10143
10145 """
10146 SetCondition(SBWatchpoint self, str const * condition)
10147
10148 The watchpoint stops only if the condition expression evaluates to true.
10149 """
10150 return _lldb.SBWatchpoint_SetCondition(self, *args)
10151
10153 """GetDescription(SBWatchpoint self, SBStream description, lldb::DescriptionLevel level) -> bool"""
10154 return _lldb.SBWatchpoint_GetDescription(self, *args)
10155
10159
10160 if _newclass:EventIsWatchpointEvent = staticmethod(EventIsWatchpointEvent)
10161 __swig_getmethods__["EventIsWatchpointEvent"] = lambda x: EventIsWatchpointEvent
10165
10166 if _newclass:GetWatchpointEventTypeFromEvent = staticmethod(GetWatchpointEventTypeFromEvent)
10167 __swig_getmethods__["GetWatchpointEventTypeFromEvent"] = lambda x: GetWatchpointEventTypeFromEvent
10171
10172 if _newclass:GetWatchpointFromEvent = staticmethod(GetWatchpointFromEvent)
10173 __swig_getmethods__["GetWatchpointFromEvent"] = lambda x: GetWatchpointFromEvent
10177
10178 SBWatchpoint_swigregister = _lldb.SBWatchpoint_swigregister
10179 SBWatchpoint_swigregister(SBWatchpoint)
10184
10188
10192
10194 import lldb
10195 """A decorator function that registers an LLDB command line
10196 command that is bound to the function it is attached to."""
10197 class obj(object):
10198 """The object that tracks adding the command to LLDB one time and handles
10199 calling the function on subsequent calls."""
10200 def __init__(self, function, command_name, doc = None):
10201 if doc:
10202 function.__doc__ = doc
10203 command = "command script add -f %s.%s %s" % (function.__module__, function.__name__, command_name)
10204 lldb.debugger.HandleCommand(command)
10205 self.function = function
10206 def __call__(self, *args, **kwargs):
10207 self.function(*args, **kwargs)
10208 def callable(function):
10209 """Creates a callable object that gets used."""
10210 return obj(function, *args, **kwargs)
10211 return callable
10212
10214 '''A class that represents a source declaration location with file, line and column.'''
10216 self.file = file
10217 self.line = line
10218 self.col = col
10219
10223
10225 if self.index >= self.length:
10226 raise StopIteration()
10227 child_sbvalue = self.sbvalue.GetChildAtIndex(self.index)
10228 self.index += 1
10229 return value(child_sbvalue)
10230
10237
10239 '''A class designed to wrap lldb.SBValue() objects so the resulting object
10240 can be used as a variable would be in code. So if you have a Point structure
10241 variable in your code in the current frame named "pt", you can initialize an instance
10242 of this class with it:
10243
10244 pt = lldb.value(lldb.frame.FindVariable("pt"))
10245 print pt
10246 print pt.x
10247 print pt.y
10248
10249 pt = lldb.value(lldb.frame.FindVariable("rectangle_array"))
10250 print rectangle_array[12]
10251 print rectangle_array[5].origin.x'''
10254
10257
10260
10262
10263 if type(key) is value:
10264 key = int(key)
10265 if type(key) is int:
10266 child_sbvalue = (self.sbvalue.GetValueForExpressionPath("[%i]" % key))
10267 if child_sbvalue and child_sbvalue.IsValid():
10268 return value(child_sbvalue)
10269 raise IndexError("Index '%d' is out of range" % key)
10270 raise TypeError("No array item of type %s" % str(type(key)))
10271
10274
10280
10282 return int(self) + int(other)
10283
10285 return int(self) - int(other)
10286
10288 return int(self) * int(other)
10289
10291 return int(self) // int(other)
10292
10294 return int(self) % int(other)
10295
10297 return int(self) % int(other)
10298
10300 return int(self) ** int(other)
10301
10303 return int(self) << int(other)
10304
10306 return int(self) >> int(other)
10307
10309 return int(self) & int(other)
10310
10312 return int(self) ^ int(other)
10313
10315 return int(self) | int(other)
10316
10318 return int(self) / int(other)
10319
10321 return int(self) / int(other)
10322
10327
10332
10337
10342
10347
10352
10357
10362
10367
10372
10377
10382
10387
10392
10395
10398
10400 return abs(int(self))
10401
10404
10406 return complex (int(self))
10407
10410
10413
10416
10419
10422
10425
10427 if type(other) is int:
10428 return int(self) == other
10429 elif type(other) is str:
10430 return str(self) == other
10431 elif type(other) is value:
10432 self_err = SBError()
10433 other_err = SBError()
10434 self_val = self.sbvalue.GetValueAsUnsigned(self_err)
10435 if self_err.fail:
10436 raise ValueError("unable to extract value of self")
10437 other_val = other.sbvalue.GetValueAsUnsigned(other_err)
10438 if other_err.fail:
10439 raise ValueError("unable to extract value of other")
10440 return self_val == other_val
10441 raise TypeError("Unknown type %s, No equality operation defined." % str(type(other)))
10442
10444 return not self.__eq__(other)
10445
10446
10447
10448
10449 debugger_unique_id = 0
10450 SBDebugger.Initialize()
10451 debugger = None
10452 target = SBTarget()
10453 process = SBProcess()
10454 thread = SBThread()
10455 frame = SBFrame()
10456