ScriptedThread#

class lldb.plugins.scripted_process.ScriptedThread(process: ScriptedProcess | SBProcess, args: SBStructuredData | None)#

The base class for a scripted thread.

Most of the base class methods are @abstractmethod that need to be overwritten by the inheriting class.

Methods Summary

get_extended_info()

Get scripted thread extended information.

get_name()

Get the scripted thread name.

get_queue()

Get the scripted thread associated queue name.

get_register_context()

Get the scripted thread register context

get_register_info()

Get the register info dictionary describing the scripted thread's registers.

get_scripted_frame_plugin()

Get scripted frame plugin name.

get_stackframes()

Get the list of stack frames for the scripted thread.

get_state()

Get the scripted thread state type.

get_stop_reason()

Get the dictionary describing the stop reason type with some data.

get_thread_id()

Get the scripted thread identifier.

get_thread_idx()

Get the scripted thread index.

Methods Documentation

get_extended_info() list[dict]#

Get scripted thread extended information.

Returns:

A list containing the extended information for the scripted process.

None if the thread as no extended information.

Return type:

List

get_name() str#

Get the scripted thread name.

Returns:

The name of the scripted thread.

Return type:

str

get_queue() str#
Get the scripted thread associated queue name.

This method is optional.

Returns:

The queue name associated with the scripted thread.

Return type:

str

abstract get_register_context() str#

Get the scripted thread register context

Returns:

A byte representing all register’s value.

Return type:

str

get_register_info() dict[str, Any]#

Get the register info dictionary describing the scripted thread’s registers. Lazily populated on first call from a per-architecture general-purpose register layout keyed off self.arch.

Returns:

The register info dictionary with sets and registers keys. sets is a list of register set names and registers is a list of register descriptions.

Return type:

Dict

Raises:

ValueError – If self.arch is not one of the architectures the base class ships a register layout for.

get_scripted_frame_plugin() str | None#

Get scripted frame plugin name.

Returns:

Name of the scripted frame plugin.

Return type:

str

get_stackframes() list[dict]#

Get the list of stack frames for the scripted thread.

scripted_frame = {
    idx = 0,
    pc = 0xbadc0ffee
}
Returns:

A list of scripted_frame dictionaries

containing at least for each entry, the frame index and the program counter value for that frame. The list can be empty.

Return type:

List[scripted_frame]

get_state() int#

Get the scripted thread state type.

eStateStopped,   ///< Process or thread is stopped and can be examined.
eStateRunning,   ///< Process or thread is running and can't be examined.
eStateStepping,  ///< Process or thread is in the process of stepping and
                 /// can not be examined.
eStateCrashed,   ///< Process or thread has crashed and can be examined.
Returns:

The state type of the scripted thread.

Returns lldb.eStateStopped by default.

Return type:

int

abstract get_stop_reason() dict[str, Any]#
Get the dictionary describing the stop reason type with some data.

This method is optional.

Returns:

The dictionary holding the stop reason type and the possibly the stop reason data.

Return type:

Dict

get_thread_id() int#

Get the scripted thread identifier.

Returns:

The identifier of the scripted thread.

Return type:

int

get_thread_idx() int#

Get the scripted thread index.

Returns:

The index of the scripted thread in the scripted process.

Return type:

int