ScriptedPlatform#

class lldb.plugins.scripted_platform.ScriptedPlatform(exe_ctx, args)#

The base class for a scripted platform.

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

Attributes Summary

Methods Summary

attach_to_process(attach_info)

Attach to a process.

get_process_info(pid)

Get the dictionary describing the process.

kill_process(pid)

Kill a process.

launch_process(launch_info)

Launch a process.

list_processes()

Get a list of processes that are running or that can be attached to on the platform.

Attributes Documentation

processes = None#

Methods Documentation

abstract attach_to_process(attach_info)#

Attach to a process.

Parameters:

attach_info (lldb.SBAttachInfo) – The information related to attach to a process.

Returns:

A status object notifying if the attach succeeded.

Return type:

lldb.SBError

get_process_info(pid)#

Get the dictionary describing the process.

Returns:

The dictionary of process info that matched process ID. None if the process doesn’t exists

Return type:

Dict

abstract kill_process(pid)#

Kill a process.

Parameters:

pid (int) – Process ID for the process to be killed.

Returns:

A status object notifying if the shutdown succeeded.

Return type:

lldb.SBError

abstract launch_process(launch_info)#

Launch a process.

Parameters:

launch_info (lldb.SBLaunchInfo) – The information related to the process launch.

Returns:

A status object notifying if the launch succeeded.

Return type:

lldb.SBError

abstract list_processes()#

Get a list of processes that are running or that can be attached to on the platform.

processes = {
    420: {
            name: a.out,
            arch: aarch64,
            pid: 420,
            parent_pid: 42 (optional),
            uid: 0 (optional),
            gid: 0 (optional),
    },
}
Returns:

The processes represented as a dictionary, with at least the

process ID, name, architecture. Optionally, the user can also provide the parent process ID and the user and group IDs. The dictionary can be empty.

Return type:

Dict