Elm
2
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.
|
inlineprotected |
Protected constructor to avoid multiple declaration.
|
inlineprotectedvirtual |
This function is called when the handler is removed.
Reimplemented in NoCrashHandler.
References CrashHandler::DEBUG, CrashHandler::INT, and CrashHandler::mode().
Referenced by GDBCrashHandler::handle(), and CrashHandler::set().
Initiate the crash of the program.
References CrashHandler::handle().
Referenced by elm::crash(), elm::handle_SIGABRT(), elm::handle_SIGFPE(), elm::handle_SIGILL(), elm::handle_SIGINT(), and elm::handle_SIGSEGV().
|
inlinestatic |
Get the current crash handler.
This function is called when a crash need to be handled.
Reimplemented in NoCrashHandler, and GDBCrashHandler.
Referenced by CrashHandler::crash().
Referenced by CrashHandler::cleanup(), CrashHandler::set(), and CrashHandler::setup().
|
static |
Set the current crash handler.
handler | New crash handler. |
mode | Working mode of the handler (combination of DEBUG and KILL). |
References CrashHandler::cleanup(), CrashHandler::mode(), and CrashHandler::setup().
Referenced by CrashMonitor::CrashMonitor(), and CrashMonitor::~CrashMonitor().
This function is called when the handler is installed.
Reimplemented in NoCrashHandler.
References CrashHandler::DEBUG, elm::handle_SIGABRT(), elm::handle_SIGFPE(), elm::handle_SIGILL(), elm::handle_SIGINT(), elm::handle_SIGSEGV(), CrashHandler::INT, and CrashHandler::mode().
Referenced by CrashHandler::set().
|
static |
Referenced by CrashHandler::cleanup(), CrashMonitor::CrashMonitor(), and CrashHandler::setup().
|
static |
Singleton of the default crash handler.
Referenced by CrashMonitor::CrashMonitor().
|
static |
Referenced by CrashHandler::cleanup(), CrashMonitor::CrashMonitor(), and CrashHandler::setup().