Crashpad
Public Member Functions | List of all members
FakeProcessMemory Class Reference
Inheritance diagram for FakeProcessMemory:
crashpad::ProcessMemory

Public Member Functions

 FakeProcessMemory (const uint8_t *data, size_t size, VMAddress fake_base)
 
ssize_t ReadUpTo (VMAddress address, size_t size, void *buffer) const override
 Copies memory from the target process into a caller-provided buffer in the current process, up to a maximum number of bytes. More...
 
- Public Member Functions inherited from crashpad::ProcessMemory
bool Read (VMAddress address, VMSize size, void *buffer) const
 Copies memory from the target process into a caller-provided buffer in the current process. More...
 
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, VMSize size, std::string *string) const
 Reads a NUL-terminated C string from the target process into a string in the current process. More...
 

Member Function Documentation

◆ ReadUpTo()

ssize_t FakeProcessMemory::ReadUpTo ( VMAddress  address,
size_t  size,
void *  buffer 
) const
inlineoverridevirtual

Copies memory from the target process into a caller-provided buffer in the current process, up to a maximum number of bytes.

Parameters
[in]addressThe address, in the target process' address space, of the memory region to copy.
[in]sizeThe maximum 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
the number of bytes copied, 0 if there is no more data to read, or -1 on failure with a message logged.

Implements crashpad::ProcessMemory.


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