Crashpad
 
Loading...
Searching...
No Matches
crashpad::internal::ScopedVMRead< T > Class Template Reference

A scoped wrapper for calls to vm_read and vm_deallocate. Allows in-process handler to safely read memory for the intermediate dump. More...

#include "util/ios/scoped_vm_read.h"

Public Member Functions

 ScopedVMRead (const ScopedVMRead &)=delete
 
ScopedVMReadoperator= (const ScopedVMRead &)=delete
 
bool Read (const void *data, size_t count=1)
 Releases any previously read data and vm_reads data.
 
bool Read (vm_address_t address, size_t count=1)
 Releases any previously read data and vm_reads address.
 
T * operator-> () const
 Returns the pointer to memory safe to read during the in-process crash handler.
 
T * get () const
 Returns the pointer to memory safe to read during the in-process crash handler.
 

Detailed Description

template<typename T>
class crashpad::internal::ScopedVMRead< T >

A scoped wrapper for calls to vm_read and vm_deallocate. Allows in-process handler to safely read memory for the intermediate dump.

Note: RUNS-DURING-CRASH.

Member Function Documentation

◆ Read() [1/2]

template<typename T>
bool crashpad::internal::ScopedVMRead< T >::Read ( const void * data,
size_t count = 1 )
inline

Releases any previously read data and vm_reads data.

Parameters
[in]dataMemory to be read by vm_read.
[in]countLength of data.
Returns
true if all data was read. Returns false on failure.

◆ Read() [2/2]

template<typename T>
bool crashpad::internal::ScopedVMRead< T >::Read ( vm_address_t address,
size_t count = 1 )
inline

Releases any previously read data and vm_reads address.

Parameters
[in]addressAddress of memory to be read by vm_read.
[in]countLength of data.
Returns
true if all of address was read. Returns false on failure.

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