Crashpad
Public Member Functions | List of all members
crashpad::internal::CaptureMemoryDelegateWin Class Reference
Inheritance diagram for crashpad::internal::CaptureMemoryDelegateWin:
crashpad::internal::CaptureMemory::Delegate

Public Member Functions

 CaptureMemoryDelegateWin (ProcessReaderWin *process_reader, const ProcessReaderWin::Thread &thread, std::vector< std::unique_ptr< MemorySnapshotGeneric >> *snapshots, uint32_t *budget_remaining)
 A MemoryCaptureDelegate for Windows. More...
 
bool Is64Bit () const override
 
bool ReadMemory (uint64_t at, uint64_t num_bytes, void *into) const override
 Attempts to read num_bytes bytes from the target process starting at address at into into. More...
 
std::vector< CheckedRange< uint64_t > > GetReadableRanges (const CheckedRange< uint64_t, uint64_t > &range) const override
 Given a range to be read from the target process, returns a vector of ranges, representing the readable portions of the original range. More...
 
void AddNewMemorySnapshot (const CheckedRange< uint64_t, uint64_t > &range) override
 Adds the given range representing a memory snapshot in the target process to the result.
 

Constructor & Destructor Documentation

◆ CaptureMemoryDelegateWin()

crashpad::internal::CaptureMemoryDelegateWin::CaptureMemoryDelegateWin ( ProcessReaderWin process_reader,
const ProcessReaderWin::Thread thread,
std::vector< std::unique_ptr< MemorySnapshotGeneric >> *  snapshots,
uint32_t *  budget_remaining 
)

A MemoryCaptureDelegate for Windows.

Parameters
[in]process_readerA ProcessReaderWin for the target process.
[in]threadThe thread being inspected. Memory ranges overlapping this thread's stack will be ignored on the assumption that they're already captured elsewhere.
[in]snapshotsA vector of MemorySnapshotGeneric to which the captured memory will be added.
[in]budget_remainingIf non-null, a pointer to the remaining number of bytes to capture. If this is 0, no further memory will be captured.

Member Function Documentation

◆ GetReadableRanges()

std::vector< CheckedRange< uint64_t > > crashpad::internal::CaptureMemoryDelegateWin::GetReadableRanges ( const CheckedRange< uint64_t, uint64_t > &  range) const
overridevirtual

Given a range to be read from the target process, returns a vector of ranges, representing the readable portions of the original range.

Parameters
[in]rangeThe range being identified.
Returns
A vector of ranges corresponding to the portion of range that is readable.

Implements crashpad::internal::CaptureMemory::Delegate.

◆ Is64Bit()

bool crashpad::internal::CaptureMemoryDelegateWin::Is64Bit ( ) const
overridevirtual
Returns
true if the target process is a 64-bit process.

Implements crashpad::internal::CaptureMemory::Delegate.

◆ ReadMemory()

bool crashpad::internal::CaptureMemoryDelegateWin::ReadMemory ( uint64_t  at,
uint64_t  num_bytes,
void *  into 
) const
overridevirtual

Attempts to read num_bytes bytes from the target process starting at address at into into.

Returns
true if the entire region could be read, or false with an error logged.

Implements crashpad::internal::CaptureMemory::Delegate.


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