Writes a variable-length string to a minidump file in accordance with the string type’s characteristics.
More...
#include "minidump/minidump_string_writer.h"
|
using | MinidumpStringType = typename Traits::MinidumpStringType |
|
using | StringType = typename Traits::StringType |
|
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...
|
|
template<typename Traits>
class crashpad::internal::MinidumpStringWriter< Traits >
Writes a variable-length string to a minidump file in accordance with the string type’s characteristics.
MinidumpStringWriter objects should not be instantiated directly. To write strings to minidump file, use the MinidumpUTF16StringWriter and MinidumpUTF8StringWriter subclasses instead.
◆ Freeze()
template<typename Traits >
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_string()
template<typename Traits >
◆ SizeOfObject()
template<typename Traits >
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.
◆ string()
template<typename Traits >
Retrieves the string to be written.
- Note
- Valid in any state.
◆ WriteObject()
template<typename Traits >
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_string_writer.h
- minidump/minidump_string_writer.cc