crashreporter#

Fully qualified name: carb::crashreporter

namespace crashreporter#

Namespace for the crash reporter.

Enumerations#

CrashSentResult

Result codes used to notify subscribers of crash dump uploads whether an upload succeed or not.

MetadataValueType

Possible types that a volatile metadata value could be.

Functions#

bool addCrashMetadata(const char *keyName, const char *value)

Adds a metadata value to the crash reporter.

bool addCrashMetadata(const char *keyName, T value)

Adds a metadata value to the crash reporter.

bool addExtraCrashFile(const char *keyName, const char *filename)

Adds an extra file to be uploaded when a crash occurs.

void deregisterCrashReporterForClient()

Deregisters and disables the crash reporter for the calling process.

std::string getCommandLineArgsAsString()

Retrieves the process' command line as a string.

carb::cpp::optional< std::string > getCrashMetadataString(const char *keyName)

Retrieves the value of a crash metadata value (if defined).

const char * getCrashMetadataValue(const char *keyName)

Retrieves the value of a crash metadata value (if defined).

bool isExtraCrashFileKeyUsed(const char *keyName)

Checks whether a key for an extra crash report file has already been used.

void registerCrashReporterForClient()

Registers the crash reporter for this process and sets it up.

std::future< void > sendAndRemoveLeftOverDumpsAsync()

Attempts to upload any crash dump files left by a previously crashed process.

int64_t writeFileBlob(FileHandle file, const void *buffer, size_t bytes)

Writes a blob of data to an open file descriptor in a platform independent manner.

Namespaces#

detail

Namespace for internal helper functions.

Structs#

CrashSentInfo

Provides a single piece of additional information or context to a crash upload complete callback function.

ICrashReporter

ICrashReporter is the interface to implement a plugin that catches and reports information about the crash to either a local file, a server, or both.

MetadataValueCallback

Descriptor of a single metadata callback function.

Typedefs#

FileHandle

An abstraction for the lowest level file handle for the given operating system.

MetadataId

Registration identifier for a single metadata value.

OnCrashSentFn

Prototype for a callback function that is performed any time a dump is successfully uploaded.

OnDumpSubmittedFn

Prototype for a callback that indicates when a crash dump upload has completed.

OnGetMetadataFileBlobFn

Metadata value callback function prototype.

OnGetMetadataFloatFn

Metadata value callback function prototype.

OnGetMetadataIntegerFn

Metadata value callback function prototype.

OnGetMetadataStringFn

Metadata value callback function prototype.

OnGetMetadataUIntegerFn

Metadata value callback function prototype.

OnGetMetadataWideStringFn

Metadata value callback function prototype.

ResolveSymbolFn

Prototype for a callback function used to resolve symbol information.

Variables#

constexpr uintptr_t kBaseMagicSignature

Base magic signature value used to verify crash reporter resources.

int kExternalTerminationSignal

Signal number to use to handle external termination requests.

constexpr MetadataId kInvalidMetadataId

Special metadata identifier to indicate an invalid metadata value or general failure in registering the value with addVolatileMetadata*().

constexpr uintptr_t kMagicSignature

Current magic signature used to verify crash reporter resources.

constexpr MetadataId kMetadataFailBadParameter

Special metadata identifier to indicate that a bad parameter was passed into one of the ICrashReporter::addVolatileMetadata *() functions.

constexpr MetadataId kMetadataFailKeyAlreadyUsed

Special metadata identifier to indicate that the key being registered is either a known reserved key or has already been registered as a volatile metadata key.