class ProcessMemoryRange

Defined at line 30 of file ../../third_party/crashpad/src/util/process/process_memory_range.h

Provides range protected access to the memory of another process.

Public Methods

void ProcessMemoryRange ()
void ProcessMemoryRange (const ProcessMemoryRange & )

Defined at line 34 of file ../../third_party/crashpad/src/util/process/process_memory_range.h

ProcessMemoryRange & operator= (const ProcessMemoryRange & )

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

void ~ProcessMemoryRange ()
bool Initialize (const ProcessMemory * memory, bool is_64_bit, VMAddress base, VMSize size)

Initializes this object.

One of the Initialize methods must be successfully called on this object

before calling any other.

Parameters

memory [in] The memory reader to delegate to.
is_64_bit [in] Whether the target process is 64-bit.
base [in] The base address of the initial range.
size [in] The size of the initial range.

Returns

`true` on success. `false` on failure with a message logged.

bool Initialize (const ProcessMemory * memory, bool is_64_bit)

Initializes this object with the maximum range for the address

space.

One of the Initialize methods must be successfully called on this object

before calling any other.

Parameters

memory [in] The memory reader to delegate to.
is_64_bit [in] Whether the target process is 64-bit.
bool Initialize (const ProcessMemoryRange & other)

Initializes this object from an existing memory range.

One of the Initialize methods must be successfully called on this object

before calling any other.

Parameters

other [in] The memory range object to initialize from.

Returns

`true` on success. `false` on failure with a message logged.

bool Is64Bit ()

Returns whether the range is part of a 64-bit address space.

Defined at line 74 of file ../../third_party/crashpad/src/util/process/process_memory_range.h

VMAddress Base ()

Returns the base address of the range.

Defined at line 77 of file ../../third_party/crashpad/src/util/process/process_memory_range.h

bool RestrictRange (VMAddress base, VMSize size)

Shrinks the range to the new base and size.

The new range must be contained within the existing range for this object.

Parameters

base [in] The new base of the range.
size [in] The new size of the range.

Returns

`true` on success. `false` on failure with a message logged.

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 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.

VMSize Size ()

Returns the size of the range.

Defined at line 80 of file ../../third_party/crashpad/src/util/process/process_memory_range.h