Writes a variable-length byte array for a minidump into a.
More...
#include "minidump/minidump_byte_array_writer.h"
|
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 constexpr size_t | kInvalidSize = std::numeric_limits<size_t>::max() |
| A size value used to signal failure by methods that return size_t .
|
|
Writes a variable-length byte array for a minidump into a.
- See also
- MinidumpByteArray.
◆ data()
const std::vector<uint8_t>& crashpad::MinidumpByteArrayWriter::data |
( |
| ) |
const |
|
inline |
Gets the data to be written.
- Note
- Valid in any state.
◆ Freeze()
bool crashpad::MinidumpByteArrayWriter::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.
◆ set_data() [1/2]
void crashpad::MinidumpByteArrayWriter::set_data |
( |
const std::vector< uint8_t > & |
data | ) |
|
|
inline |
◆ set_data() [2/2]
void crashpad::MinidumpByteArrayWriter::set_data |
( |
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
◆ SizeOfObject()
size_t crashpad::MinidumpByteArrayWriter::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.
◆ WriteObject()
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_byte_array_writer.h
- minidump/minidump_byte_array_writer.cc