Crashpad
Public Member Functions | Friends | List of all members
crashpad::SnapshotMinidumpMemoryWriter Class Reference

The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a minidump file. More...

#include "minidump/minidump_memory_writer.h"

Inheritance diagram for crashpad::SnapshotMinidumpMemoryWriter:
crashpad::internal::MinidumpWritable crashpad::MemorySnapshot::Delegate crashpad::test::TestMinidumpMemoryWriter

Public Member Functions

 SnapshotMinidumpMemoryWriter (const MemorySnapshot *memory_snapshot)
 
const MINIDUMP_MEMORY_DESCRIPTORMinidumpMemoryDescriptor () const
 Returns a MINIDUMP_MEMORY_DESCRIPTOR referencing the data that this object writes. More...
 
void RegisterMemoryDescriptor (MINIDUMP_MEMORY_DESCRIPTOR *memory_descriptor)
 Registers a memory descriptor as one that should point to the object on which this method is called. More...
 
void SetSnapshot (const MemorySnapshot *memory_snapshot)
 Sets the underlying memory snapshot. Does not take ownership of memory_snapshot.
 
- Public Member Functions inherited from crashpad::internal::MinidumpWritable
virtual bool WriteEverything (FileWriterInterface *file_writer)
 Writes an object and all of its children to a minidump file. More...
 
void RegisterRVA (RVA *rva)
 Registers a file offset pointer as one that should point to the object on which this method is called. More...
 
void RegisterLocationDescriptor (MINIDUMP_LOCATION_DESCRIPTOR *location_descriptor)
 Registers a location descriptor as one that should point to the object on which this method is called. More...
 

Friends

class MinidumpMemoryListWriter
 

Additional Inherited Members

- Protected Types inherited from crashpad::internal::MinidumpWritable
enum  State
 Identifies the state of an object. More...
 
enum  Phase
 Identifies the phase during which an object will be written to a minidump file. More...
 
- Protected Member Functions inherited from crashpad::internal::MinidumpWritable
State state () const
 The state of the object.
 
virtual std::vector< MinidumpWritable * > Children ()
 Returns the object’s children. More...
 
size_t WillWriteAtOffset (Phase phase, FileOffset *offset, std::vector< MinidumpWritable * > *write_sequence)
 Prepares the object to be written at a known file offset, transitioning it from kStateFrozen to kStateWritable. More...
 
bool WritePaddingAndObject (FileWriterInterface *file_writer)
 Writes the object, transitioning it from kStateWritable to kStateWritten. More...
 
- Static Protected Attributes inherited from crashpad::internal::MinidumpWritable
static constexpr size_t kInvalidSize = std::numeric_limits<size_t>::max()
 A size value used to signal failure by methods that return size_t.
 

Detailed Description

The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a minidump file.

Member Function Documentation

◆ MinidumpMemoryDescriptor()

const MINIDUMP_MEMORY_DESCRIPTOR * crashpad::SnapshotMinidumpMemoryWriter::MinidumpMemoryDescriptor ( ) const

Returns a MINIDUMP_MEMORY_DESCRIPTOR referencing the data that this object writes.

This method is expected to be called by a MinidumpMemoryListWriter in order to obtain a MINIDUMP_MEMORY_DESCRIPTOR to include in its list.

Note
Valid in kStateWritable.

◆ RegisterMemoryDescriptor()

void crashpad::SnapshotMinidumpMemoryWriter::RegisterMemoryDescriptor ( MINIDUMP_MEMORY_DESCRIPTOR memory_descriptor)

Registers a memory descriptor as one that should point to the object on which this method is called.

This method is expected to be called by objects of other classes, when those other classes have their own memory descriptors that need to point to memory ranges within a minidump file. MinidumpThreadWriter is one such class. This method is public for this reason, otherwise it would suffice to be private.

Note
Valid in kStateFrozen or any preceding state.

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