Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Safir::Utilities::CrashReporter Class Reference

#include <Safir/Utilities/CrashReporter.h>

Public Types

typedef void(* DumpCallback) (const char *const dumpPath)
 dumpPath is ascii only!
 

Static Public Member Functions

static void Start ()
 Initiate the crash reporting functionality.
 
static void Stop ()
 Unregister the crash reporting functionality and clean up resources.
 
static void RegisterCallback (const DumpCallback callback)
 Register a callback that will be called when a dump has occurred.
 
static bool Dump ()
 Write a dump immediately.
 

Member Typedef Documentation

◆ DumpCallback

typedef void(* Safir::Utilities::CrashReporter::DumpCallback) (const char *const dumpPath)

dumpPath is ascii only!

Member Function Documentation

◆ Dump()

static bool Safir::Utilities::CrashReporter::Dump ( )
static

Write a dump immediately.

This can be used to capture the execution state independently of a crash. Note that the registered dump callbacks will be invoked.

Will return false if Start has not been called.

◆ RegisterCallback()

static void Safir::Utilities::CrashReporter::RegisterCallback ( const DumpCallback callback)
static

Register a callback that will be called when a dump has occurred.

This can be used to report that a dump has occurred, or maybe to clean up state. Be aware that the application may be in an undefined state at this point...

◆ Start()

static void Safir::Utilities::CrashReporter::Start ( )
static

Initiate the crash reporting functionality.

After this has been called crashes will generate a dump under runtime/data/crash_reports. For more info on the dump format, see google breakpad wiki/docs.

◆ Stop()

static void Safir::Utilities::CrashReporter::Stop ( )
static

Unregister the crash reporting functionality and clean up resources.

Should be called before the application exits.

Must NOT be called from within the callback! Deadlock will ensue!