Wrapper class for writing intermediate dump file. More...
#include "util/ios/ios_intermediate_dump_writer.h"
Classes | |
class | ScopedArray |
A scoped wrapper for calls to ArrayStart and ArrayEnd. More... | |
class | ScopedArrayMap |
A scoped wrapper for calls to ArrayMapStart and MapEnd. More... | |
class | ScopedMap |
A scoped wrapper for calls to MapStart and MapEnd. More... | |
class | ScopedRootMap |
A scoped wrapper for calls to RootMapStart and RootMapEnd. More... | |
Public Types | |
enum class | CommandType : uint8_t |
Command instructions for the intermediate dump reader. More... | |
Public Member Functions | |
IOSIntermediateDumpWriter (const IOSIntermediateDumpWriter &)=delete | |
IOSIntermediateDumpWriter & | operator= (const IOSIntermediateDumpWriter &)=delete |
bool | Open (const base::FilePath &path) |
Open and lock an intermediate dump file. This is the only method in the writer class that is generally run outside of a crash. | |
bool | Close () |
Completes writing the intermediate dump file and releases the file handle. | |
template<typename T> | |
bool | AddProperty (IntermediateDumpKey key, const T *value, size_t count=1) |
bool | AddPropertyBytes (IntermediateDumpKey key, const void *value, size_t value_length) |
bool | AddPropertyCString (IntermediateDumpKey key, size_t max_length, const char *value) |
Wrapper class for writing intermediate dump file.
Due to the limitations of in-process handling, an intermediate dump file is written during exceptions. The data is streamed to a file using only in-process safe methods.
The file format is similar to binary JSON, supporting keyed properties, maps and arrays.
Similar to JSON, maps can contain other maps, arrays and properties.
Note: All methods are RUNS-DURING-CRASH
.
|
strong |
Command instructions for the intermediate dump reader.
|
inline |
true
if able to AddPropertyInternal the key value count tuple.
|
inline |
true
if able to AddPropertyInternal the key value count tuple. bool crashpad::internal::IOSIntermediateDumpWriter::AddPropertyCString | ( | IntermediateDumpKey | key, |
size_t | max_length, | ||
const char * | value ) |
true
if able to vm_read a string of value and write a kProperty command with the key value up to a NUL byte. The string cannot be longer than max_length with a maximum string length of 1024. bool crashpad::internal::IOSIntermediateDumpWriter::Close | ( | ) |
Completes writing the intermediate dump file and releases the file handle.
true
, otherwise returns false
. bool crashpad::internal::IOSIntermediateDumpWriter::Open | ( | const base::FilePath & | path | ) |
Open and lock an intermediate dump file. This is the only method in the writer class that is generally run outside of a crash.
The client must invoke Close()
before this object is destroyed.
[in] | path | The path to the intermediate dump. |
true
, otherwise returns false
.