Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/debug/CrashHandler.h>
Public Types | |
typedef t::uint32 | mode_t |
Public Member Functions | |
virtual void | setup (void) |
virtual void | handle (void) |
virtual void | cleanup (void) |
Static Public Member Functions | |
static void | set (CrashHandler *handler, mode_t mode) |
static CrashHandler * | get (void) |
static mode_t | mode (void) |
static void | crash (void) |
Static Public Attributes | |
static const t::uint32 | DEBUG = 0x01 |
static const t::uint32 | INT = 0x02 |
static CrashHandler | DEFAULT |
Protected Member Functions | |
CrashHandler (void) | |
virtual | ~CrashHandler (void) |
This allows to provide customized handler for program crash. Currently, there are only two: this default crash handler reverting to the program abort and the GDBCrashHandler.
typedef t::uint32 elm::CrashHandler::mode_t |
|
protected |
Protected constructor to avoid multiple declaration.
|
protectedvirtual |
|
virtual |
This function is called when the handler is removed.
Reimplemented in elm::NoCrashHandler.
References DEBUG, INT, and mode().
Referenced by elm::GDBCrashHandler::handle(), and set().
|
static |
Initiate the crash of the program.
References handle().
Referenced by elm::crash(), elm::handle_SIGABRT(), elm::handle_SIGFPE(), elm::handle_SIGILL(), elm::handle_SIGINT(), and elm::handle_SIGSEGV().
|
static |
Get the current crash handler.
|
virtual |
This function is called when a crash need to be handled.
Reimplemented in elm::NoCrashHandler, and elm::GDBCrashHandler.
Referenced by crash().
|
static |
|
virtual |
This function is called when the handler is installed.
Reimplemented in elm::NoCrashHandler.
References DEBUG, elm::handle_SIGABRT(), elm::handle_SIGFPE(), elm::handle_SIGILL(), elm::handle_SIGINT(), elm::handle_SIGSEGV(), INT, and mode().
Referenced by set().
|
static |
Singleton of the default crash handler.