LLDB Python API¶
lldb Package¶
The lldb module contains the public APIs for Python binding.
Some of the important classes are described here:
SBTarget
: Represents the target program running under the debugger.SBProcess
: Represents the process associated with the target program.SBThread
: Represents a thread of execution.SBProcess
contains SBThreads.SBFrame
: Represents one of the stack frames associated with a thread.SBThread
contains SBFrame(s).SBSymbolContext
: A container that stores various debugger related info.SBValue
: Represents the value of a variable, a register, or an expression.SBModule
: Represents an executable image and its associated object and symbol files.SBTarget
contains SBModule.SBBreakpoint
: Represents a logical breakpoint and its associated settings.SBTarget
contains SBBreakpoints.SBSymbol
: Represents the symbol possibly associated with a stack frame.SBCompileUnit
: Represents a compilation unit, or compiled source file.SBFunction
: Represents a generic function, which can be inlined or not.SBBlock
: Represents a lexical block.SBFunction
contains SBBlocks.SBLineEntry
: Specifies an association with a contiguous range of instructions and a source file location.SBCompileUnit
contains SBLineEntry.
The different enums in the lldb
module are described in Python API enumerators and constants.
Classes¶
SBAddress (*args) |
A section + offset based address class. |
SBAttachInfo (*args) |
Describes how to attach when calling SBTarget.Attach . |
SBBlock (*args) |
Represents a lexical block. |
SBBreakpoint (*args) |
Represents a logical breakpoint and its associated settings. |
SBBreakpointList (target) |
Represents a list of SBBreakpoint . |
SBBreakpointLocation (*args) |
Represents one unique instance (by address) of a logical breakpoint. |
SBBreakpointName (*args) |
Represents a breakpoint name registered in a given SBTarget . |
SBBroadcaster (*args) |
Represents an entity which can broadcast events. |
SBCommandInterpreter (rhs) |
SBCommandInterpreter handles/interprets commands for lldb. |
SBCommandInterpreterRunOptions () |
SBCommandInterpreterRunOptions controls how the RunCommandInterpreter runs the code it is fed. |
SBCommandReturnObject (*args) |
Represents a container which holds the result from command execution. |
SBCommunication (*args) |
Allows sending/receiving data. |
SBCompileUnit (*args) |
Represents a compilation unit, or compiled source file. |
SBData (*args) |
Represents a data buffer. |
SBDebugger (*args) |
SBDebugger is the primordial object that creates SBTargets and provides access to them. |
SBDeclaration (*args) |
Specifies an association with a line and column for a variable. |
SBEnvironment (*args) |
Represents the environment of a certain process. |
SBError (*args) |
Represents a container for holding any error code. |
SBEvent (*args) |
API clients can register to receive events. |
SBExecutionContext (*args) |
Describes the program context in which a command should be executed. |
SBExpressionOptions (*args) |
A container for options to use when evaluating expressions. |
SBFile (*args) |
Represents a file. |
SBFileSpec (*args) |
Represents a file specification that divides the path into a directory and basename. |
SBFileSpecList (*args) |
Represents a list of SBFileSpec . |
SBFrame (*args) |
Represents one of the stack frames associated with a thread. |
SBFunction (*args) |
Represents a generic function, which can be inlined or not. |
SBHostOS () |
Provides information about the host system. |
SBInstruction (*args) |
Represents a (machine language) instruction. |
SBInstructionList (*args) |
Represents a list of machine instructions. |
SBLanguageRuntime () |
Utility functions for LanguageType |
SBLaunchInfo (argv) |
Describes how a target or program should be launched. |
SBLineEntry (*args) |
Specifies an association with a contiguous range of instructions and a source file location. |
SBListener (*args) |
API clients can register its own listener to debugger events. |
SBMemoryRegionInfo (*args) |
API clients can get information about memory regions in processes. |
SBMemoryRegionInfoList (*args) |
Represents a list of SBMemoryRegionInfo . |
SBModule (*args) |
Represents an executable image and its associated object and symbol files. |
SBModuleSpec (*args) |
Proxy of C++ lldb::SBModuleSpec class. |
SBModuleSpecList (*args) |
Represents a list of SBModuleSpec . |
SBPlatform (*args) |
A class that represents a platform that can represent the current host or a remote host debug platform. |
SBPlatformConnectOptions (*args) |
Describes how SBPlatform.ConnectRemote connects to a remote platform. |
SBPlatformShellCommand (*args) |
Represents a shell command that can be run by SBPlatform.Run . |
SBProcess (*args) |
Represents the process associated with the target program. |
SBProcessInfo (*args) |
Describes an existing process and any discoverable information that pertains to that process. |
SBQueue (*args) |
Represents a libdispatch queue in the process. |
SBQueueItem (*args) |
This class represents an item in an SBQueue . |
SBReproducer () |
Controls LLDB’s reproducer functionality. |
SBSection (*args) |
Represents an executable image section. |
SBSourceManager (rhs) |
Represents a central authority for displaying source code. |
SBStream () |
Represents a destination for streaming data output to. |
SBStringList (*args) |
Represents a list of strings. |
SBStructuredData (*args) |
A class representing a StructuredData event. |
SBSymbol (*args) |
Represents the symbol possibly associated with a stack frame. |
SBSymbolContext (*args) |
A context object that provides access to core debugger entities. |
SBSymbolContextList (*args) |
Represents a list of symbol context object. |
SBSyntheticValueProvider (valobj) |
|
SBTarget (*args) |
Represents the target program running under the debugger. |
SBThread (*args) |
Represents a thread of execution. |
SBThreadCollection (*args) |
Represents a collection of SBThread objects. |
SBThreadPlan (*args) |
Represents a plan for the execution control of a given thread. |
SBTrace () |
Represents a processor trace. |
SBTraceOptions () |
Represents the possible options when doing processor tracing. |
SBType (*args) |
Represents a data type in lldb. |
SBTypeCategory (*args) |
Represents a category that can contain formatters for types. |
SBTypeEnumMember (*args) |
Represents a member of an enum in lldb. |
SBTypeEnumMemberList (*args) |
Represents a list of SBTypeEnumMembers. |
SBTypeFilter (*args) |
Represents a filter that can be associated to one or more types. |
SBTypeFormat (*args) |
Represents a format that can be associated to one or more types. |
SBTypeList () |
Represents a list of SBType s. |
SBTypeMember (*args) |
Represents a member of a type. |
SBTypeMemberFunction (*args) |
Represents a member function of a type. |
SBTypeNameSpecifier (*args) |
Represents a general way to provide a type name to LLDB APIs. |
SBTypeSummary (*args) |
Represents a summary that can be associated to one or more types. |
SBTypeSummaryOptions (*args) |
Proxy of C++ lldb::SBTypeSummaryOptions class. |
SBTypeSynthetic (*args) |
Represents a summary that can be associated to one or more types. |
SBUnixSignals (*args) |
Allows you to manipulate LLDB’s signal disposition |
SBValue (*args) |
Represents the value of a variable, a register, or an expression. |
SBValueList (*args) |
Represents a collection of SBValues. |
SBVariablesOptions (*args) |
Describes which variables should be returned from SBFrame.GetVariables . |
SBWatchpoint (*args) |
Represents an instance of watchpoint for a specific target program. |
declaration (file, line, col) |
A class that represents a source declaration location with file, line and column. |
value (sbvalue) |
Wraps SBValue objects so the resulting object can be used as a variable would be in code. |
value_iter (value) |
Allows iterating over the children of an SBValue . |