Crashpad

Classes | Public Member Functions | List of all members
crashpad::MemorySnapshot Class Referenceabstract

An abstract interface to a snapshot representing a region of memory present in a snapshot process. More...

`#include "snapshot/memory_snapshot.h"`

Inheritance diagram for crashpad::MemorySnapshot:

## Classes
class | Delegate
| An interface that MemorySnapshot clients must implement in order to receive memory snapshot data. More...

## Public Member Functions
virtual uint64_t | Address () const =0
| The base address of the memory snapshot in the snapshot process’ address space.
virtual size_t | Size () const =0
| The size of the memory snapshot.
virtual bool | Read (Delegate *delegate) const =0
| Calls Delegate::MemorySnapshotDelegateRead(), providing it with the memory snapshot’s data. More...

## Detailed Description

An abstract interface to a snapshot representing a region of memory present in a snapshot process.

## Member Function Documentation

## ◆ Read()

virtual bool crashpad::MemorySnapshot::Read | ( | Delegate * | delegate | ) | const
| pure virtual

Calls Delegate::MemorySnapshotDelegateRead(), providing it with the memory snapshot’s data.

Implementations do not necessarily read the memory snapshot data prior to this method being called. Memory snapshot data may be loaded lazily and may be discarded after being passed to the delegate. This provides clean memory management without burdening a snapshot implementation with the requirement that it track all memory region data simultaneously.

Returns
  `false` on failure, otherwise, the return value of Delegate::MemorySnapshotDelegateRead(), which should be `true` on success and `false` on failure.

Implemented in crashpad::internal::MemorySnapshotMac, crashpad::internal::MemorySnapshotWin, and crashpad::test::TestMemorySnapshot.

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

- snapshot/memory_snapshot.h