crashpad::MinidumpMiscInfoWriter Class Referencefinal

The writer for a stream in the MINIDUMP_MISC_INFO family in a minidump file. More...

`#include "minidump/minidump_misc_info_writer.h"`

Inheritance diagram for crashpad::MinidumpMiscInfoWriter:

## Public Member Functions

void | InitializeFromSnapshot (const ProcessSnapshot *process_snapshot)
| Initializes MINIDUMP_MISC_INFO_N based on process_snapshot. More...
void | SetProcessID (uint32_t process_id)
| Sets the field referenced by MINIDUMP_MISC1_PROCESS_ID.
void | SetProcessTimes (time_t process_create_time, uint32_t process_user_time, uint32_t process_kernel_time)
| Sets the fields referenced by MINIDUMP_MISC1_PROCESS_TIMES.
void | SetProcessorPowerInfo (uint32_t processor_max_mhz, uint32_t processor_current_mhz, uint32_t processor_mhz_limit, uint32_t processor_max_idle_state, uint32_t processor_current_idle_state)
| Sets the fields referenced by MINIDUMP_MISC1_PROCESSOR_POWER_INFO.
void | SetProcessIntegrityLevel (uint32_t process_integrity_level)
| Sets the field referenced by MINIDUMP_MISC3_PROCESS_INTEGRITY.
void | SetProcessExecuteFlags (uint32_t process_execute_flags)
| Sets the field referenced by MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS.
void | SetProtectedProcess (uint32_t protected_process)
| Sets the field referenced by MINIDUMP_MISC3_PROTECTED_PROCESS.
void | SetTimeZone (uint32_t time_zone_id, int32_t bias, const std::string &standard_name, const SYSTEMTIME &standard_date, int32_t standard_bias, const std::string &daylight_name, const SYSTEMTIME &daylight_date, int32_t daylight_bias)
| Sets the fields referenced by MINIDUMP_MISC3_TIMEZONE.
void | SetBuildString (const std::string &build_string, const std::string &debug_build_string)
| Sets the fields referenced by MINIDUMP_MISC4_BUILDSTRING.
void | SetXStateData (const XSTATE_CONFIG_FEATURE_MSC_INFO &xstate_data)
| Sets MINIDUMP_MISC_INFO_5::XStateData.
void | SetProcessCookie (uint32_t process_cookie)
| Sets the field referenced by MINIDUMP_MISC5_PROCESS_COOKIE.
Public Member Functions inherited from crashpad::internal::MinidumpStreamWriter
const MINIDUMP_DIRECTORY * | DirectoryListEntry () const
| Returns a MINIDUMP_DIRECTORY entry that serves as a pointer to this stream. More...
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...

## Protected Member Functions

bool | Freeze () override
| Transitions the object from kStateMutable to kStateFrozen. More...
size_t | SizeOfObject () override
| Returns the amount of space that this object will consume when written to a minidump file, in bytes, not including any leading or trailing padding necessary to maintain proper alignment. More...
bool | WriteObject (FileWriterInterface *file_writer) override
| Writes the object’s content. More...
MinidumpStreamType | StreamType () const override
| Returns an object’s stream type. More...
Protected Member Functions inherited from crashpad::internal::MinidumpStreamWriter
bool | Freeze () override
| Transitions the object from kStateMutable to kStateFrozen. More...
Protected Member Functions inherited from crashpad::internal::MinidumpWritable
State | state () const
| The state of the object.
virtual size_t | Alignment ()
| Returns the object’s desired byte-boundary alignment. More...
virtual std::vector< MinidumpWritable * > | Children ()
| Returns the object’s children. More...
virtual Phase | WritePhase ()
| Returns the object’s desired write phase. 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...
virtual bool | WillWriteAtOffsetImpl (FileOffset offset)
| Called once an object’s writable file offset is determined, as it transitions into kStateWritable. More...
bool | WritePaddingAndObject (FileWriterInterface *file_writer)
| Writes the object, transitioning it from kStateWritable to kStateWritten. More...

## 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...
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 writer for a stream in the MINIDUMP_MISC_INFO family in a minidump file.

The actual stream written will be a MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4, or MINIDUMP_MISC_INFO_5 stream. Later versions of MINIDUMP_MISC_INFO are supersets of earlier versions. The earliest version that supports all of the information that an object of this class contains will be used.

## Member Function Documentation

## Freeze()

bool crashpad::MinidumpMiscInfoWriter::Freeze | ( |  | ) |

overrideprotectedvirtual

Transitions the object from kStateMutable to kStateFrozen.

The default implementation marks the object as frozen and recursively calls Freeze() on all of its children. Subclasses may override this method to perform processing that should only be done once callers have finished populating an object with data. Typically, a subclass implementation would call RegisterRVA() or RegisterLocationDescriptor() on other objects as appropriate, because at the time Freeze() runs, the in-memory locations of RVAs and location descriptors are known and will not change for the remaining duration of an object’s lifetime.

Returns
  `true` on success. `false` on failure, with an appropriate message logged.

Reimplemented from crashpad::internal::MinidumpWritable.

## InitializeFromSnapshot()

void crashpad::MinidumpMiscInfoWriter::InitializeFromSnapshot | ( | const ProcessSnapshot * | process_snapshot | ) |

Initializes MINIDUMP_MISC_INFO_N based on process_snapshot.

Parameters

  [in] | process_snapshot | The process snapshot to use as source data.

Note
  Valid in kStateMutable. No mutator methods may be called before this method, and it is not normally necessary to call any mutator methods after this method.

## SizeOfObject()

size_t crashpad::MinidumpMiscInfoWriter::SizeOfObject | ( |  | ) |

overrideprotectedvirtual

Returns the amount of space that this object will consume when written to a minidump file, in bytes, not including any leading or trailing padding necessary to maintain proper alignment.

Note
  Valid in kStateFrozen or any subsequent state.

Implements crashpad::internal::MinidumpWritable.

## StreamType()

MinidumpStreamType crashpad::MinidumpMiscInfoWriter::StreamType | ( |  | ) | const

overrideprotectedvirtual

Returns an object’s stream type.

Note
  Valid in any state.

Implements crashpad::internal::MinidumpStreamWriter.

## WriteObject()

bool crashpad::MinidumpMiscInfoWriter::WriteObject | ( | FileWriterInterface * | file_writer | ) |

overrideprotectedvirtual

Writes the object’s content.

Parameters

  [in] | file_writer | The file writer to receive the object’s content.

Returns
  `true` on success. `false` on error, indicating that the content could not be written to the minidump file.

Note
  Valid in kStateWritable. The object will transition to kStateWritten after this method returns.

Implements crashpad::internal::MinidumpWritable.

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

- minidump/minidump_misc_info_writer.h
- minidump/minidump_misc_info_writer.cc