PassthroughScriptedProcess#

class lldb.plugins.scripted_process.PassthroughScriptedProcess(exe_ctx: SBExecutionContext, args: SBStructuredData, launched_driving_process: bool = True)#

A reference ScriptedProcess subclass that forwards every request to a β€œdriving” process running in another target of the same debugger. Useful as a starting point when the extension only needs to reshape or filter data from a real underlying process.

Attributes Summary

Methods Summary

get_memory_region_containing_address(addr)

Get the memory region for the scripted process, containing a

get_process_id()

Get the scripted process identifier.

get_scripted_thread_plugin()

Get scripted thread plugin name.

is_alive()

Check if the scripted process is alive.

read_memory_at_address(addr, size, error)

Get a memory buffer from the scripted process at a certain address,

write_memory_at_address(addr, data, error)

Write a buffer to the scripted process memory.

Attributes Documentation

driving_process = None#
driving_target = None#

Methods Documentation

get_memory_region_containing_address(addr: int) SBMemoryRegionInfo | None#
Get the memory region for the scripted process, containing a

specific address.

Parameters:

addr (int) – Address to look for in the scripted process memory regions.

Returns:

The memory region containing the address.

None if out of bounds.

Return type:

lldb.SBMemoryRegionInfo

get_process_id() int#

Get the scripted process identifier.

Returns:

The scripted process identifier.

Return type:

int

get_scripted_thread_plugin() str#

Get scripted thread plugin name.

Returns:

Name of the scripted thread plugin.

Return type:

str

is_alive() bool#

Check if the scripted process is alive.

Returns:

True if scripted process is alive. False otherwise.

Return type:

bool

read_memory_at_address(addr: int, size: int, error: SBError) SBData#
Get a memory buffer from the scripted process at a certain address,

of a certain size.

Parameters:
  • addr (int) – Address from which we should start reading.

  • size (int) – Size of the memory to read.

  • error (lldb.SBError) – Error object.

Returns:

An SBData buffer with the target byte size and

byte order storing the memory read.

Return type:

lldb.SBData

write_memory_at_address(addr: int, data: SBData, error: SBError) int#

Write a buffer to the scripted process memory.

Parameters:
  • addr (int) – Address from which we should start reading.

  • data (lldb.SBData) – An SBData buffer to write to the process

  • memory. –

  • error (lldb.SBError) – Error object.

Returns:

Size of the memory to read.

Return type:

size (int)