Crashpad
Public Member Functions | List of all members
crashpad::ProcessMemoryLinux Class Referencefinal

Accesses the memory of another Linux process. More...

#include "util/process/process_memory_linux.h"

Inheritance diagram for crashpad::ProcessMemoryLinux:
crashpad::ProcessMemory

Public Member Functions

bool Initialize (pid_t pid)
 Initializes this object to read the memory of a process whose ID is pid. More...
 
bool Read (VMAddress address, size_t size, void *buffer) const override
 Copies memory from the target process into a caller-provided buffer in the current process. More...
 
- Public Member Functions inherited from crashpad::ProcessMemory
bool ReadCString (VMAddress address, std::string *string) const
 Reads a NUL-terminated C string from the target process into a string in the current process. More...
 
bool ReadCStringSizeLimited (VMAddress address, size_t size, std::string *string) const
 Reads a NUL-terminated C string from the target process into a string in the current process. More...
 

Detailed Description

Accesses the memory of another Linux process.

Member Function Documentation

◆ Initialize()

bool crashpad::ProcessMemoryLinux::Initialize ( pid_t  pid)

Initializes this object to read the memory of a process whose ID is pid.

This method must be called successfully prior to calling any other method in this class.

Parameters
[in]pidThe process ID of a target process.
Returns
true on success, false on failure with a message logged.

◆ Read()

bool crashpad::ProcessMemoryLinux::Read ( VMAddress  address,
size_t  size,
void *  buffer 
) const
overridevirtual

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

Parameters
[in]addressThe address, in the target process' address space, of the memory region to copy.
[in]sizeThe size, in bytes, of the memory region to copy. buffer must be at least this size.
[out]bufferThe buffer into which the contents of the other process' memory will be copied.
Returns
true on success, with buffer filled appropriately. false on failure, with a message logged.

Implements crashpad::ProcessMemory.


The documentation for this class was generated from the following files: