Crashpad
 
Loading...
Searching...
No Matches
crashpad::internal::CaptureMemoryDelegateLinux Class Reference
Inheritance diagram for crashpad::internal::CaptureMemoryDelegateLinux:
[legend]
Collaboration diagram for crashpad::internal::CaptureMemoryDelegateLinux:
[legend]

Public Member Functions

 CaptureMemoryDelegateLinux (ProcessReaderLinux *process_reader, const ProcessReaderLinux::Thread *thread_opt, std::vector< std::unique_ptr< MemorySnapshotGeneric > > *snapshots, uint32_t *budget_remaining)
 A MemoryCaptureDelegate for Linux.
 
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.
 
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.
 
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

◆ CaptureMemoryDelegateLinux()

crashpad::internal::CaptureMemoryDelegateLinux::CaptureMemoryDelegateLinux ( ProcessReaderLinux * process_reader,
const ProcessReaderLinux::Thread * thread_opt,
std::vector< std::unique_ptr< MemorySnapshotGeneric > > * snapshots,
uint32_t * budget_remaining )

A MemoryCaptureDelegate for Linux.

Parameters
[in]process_readerA ProcessReaderLinux for the target process.
[in]thread_optThe thread being inspected. Memory ranges overlapping this thread's stack will be ignored on the assumption that they're already captured elsewhere. May be nullptr.
[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

◆ AddNewMemorySnapshot()

void crashpad::internal::CaptureMemoryDelegateLinux::AddNewMemorySnapshot ( const CheckedRange< uint64_t, uint64_t > & range)
overridevirtual

Adds the given range representing a memory snapshot in the target process to the result.

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

◆ GetReadableRanges()

std::vector< CheckedRange< uint64_t > > crashpad::internal::CaptureMemoryDelegateLinux::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::CaptureMemoryDelegateLinux::Is64Bit ( ) const
overridevirtual
Returns
true if the target process is a 64-bit process.

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

◆ ReadMemory()

bool crashpad::internal::CaptureMemoryDelegateLinux::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: