class ProcessMemory

Defined at line 35 of file ../../third_party/crashpad/src/util/process/process_memory.h

Abstract base class for accessing the memory of another process.

Implementations are platform-specific.

Public Methods

bool Read (VMAddress address, VMSize size, void * buffer)

Copies memory from the target process into a caller-provided buffer

in the current process.

Parameters

address [in] The address, in the target process' address space, of the memory region to copy.
size [in] The size, in bytes, of the memory region to copy. must be at least this size.
buffer [out] The buffer into which the contents of the other process' memory will be copied.

Returns

`true` on success, with

filled appropriately. `false` on

failure, with a message logged.

bool ReadCString (VMAddress address, std::string * string)

Reads a `NUL`-terminated C string from the target process into a

string in the current process.

The length of the string need not be known ahead of time. This method will

read contiguous memory until a `NUL` terminator is found.

Parameters

address [in] The address, in the target process’s address space, of the string to copy.
string [out] The string read from the other process.

Returns

`true` on success, with

set appropriately. `false` on

failure, with a message logged. Failures can occur, for example, when

encountering unmapped or unreadable pages.

Defined at line 64 of file ../../third_party/crashpad/src/util/process/process_memory.h

bool ReadCStringSizeLimited (VMAddress address, VMSize size, std::string * string)

Reads a `NUL`-terminated C string from the target process into a

string in the current process.

Parameters

address [in] The address, in the target process’s address space, of the string to copy.
size [in] The maximum number of bytes to read. The string is required to be `NUL`-terminated within this many bytes.
string [out] The string read from the other process.

Returns

`true` on success, with

set appropriately. `false` on

failure, with a message logged. Failures can occur, for example, when

a `NUL` terminator is not found within

bytes, or when

encountering unmapped or unreadable pages.

Defined at line 81 of file ../../third_party/crashpad/src/util/process/process_memory.h

void ~ProcessMemory ()

Defined at line 87 of file ../../third_party/crashpad/src/util/process/process_memory.h

Protected Methods

void ProcessMemory ()

Defined at line 90 of file ../../third_party/crashpad/src/util/process/process_memory.h

Friends

class ProcessMemorySanitized