#include <Iguana/Utilities/classlib/utils/DebugAids.h>
Public Types | |
typedef char(* | AssertHook )(const char *message) |
Application hook to deal with assertion failures. | |
Static Public Member Functions | |
static void | breakpoint (void) |
static void | coredump (int sig,...) |
static void | failed (const char *file, int line, const char *function, const char *expr) |
static AssertHook | failHook (AssertHook hook=0) |
static int | failIgnore (int count=-1) |
static char | failStdxx (const char *message) |
static IOFD | failStdxxFd (IOFD fd=IOFD_INVALID) |
static void | stacktrace (IOFD fd=IOFD_INVALID) |
static IOFD | stacktraceFd (IOFD fd=IOFD_INVALID) |
static bool | validate (const void *p, STDC::size_t bytes, bool rw) |
static bool | validate (const char *str, int length=-1) |
Static Private Attributes | |
static AssertHook | s_assertHook |
static int | s_assertIgnoreCount |
static IOFD | s_assertOutputFd |
static IOFD | s_stackTraceFd |
Definition at line 125 of file DebugAids.h.
typedef char(* lat::DebugAids::AssertHook)(const char *message) |
Application hook to deal with assertion failures.
message is the formatted assertion failure message that should be displayed to the user; it should not be modified or freed by the hook. The return value should be one of the following characters: `a' to abort, `r' to run breakpoint() and then retry (this may cause a fall into a debugger on some platforms), `i' to ignore the failure, `c' to dump a core and then retry, `s' to dump stack trace and then retry (FIXME: `t' to throw/longjmp?). Here "retry" means that the assertion failure will be processed again, invoking the hook once again.
static void lat::DebugAids::failed | ( | const char * | file, | |
int | line, | |||
const char * | function, | |||
const char * | expr | |||
) | [static] |
Referenced by lat::ASSERT_VALIDATOR().
static AssertHook lat::DebugAids::failHook | ( | AssertHook | hook = 0 |
) | [static] |
static char lat::DebugAids::failStdxx | ( | const char * | message | ) | [static] |
Referenced by lat::ASSERT_VALIDATOR().
AssertHook lat::DebugAids::s_assertHook [static, private] |
Definition at line 168 of file DebugAids.h.
int lat::DebugAids::s_assertIgnoreCount [static, private] |
Definition at line 169 of file DebugAids.h.
IOFD lat::DebugAids::s_assertOutputFd [static, private] |
Definition at line 170 of file DebugAids.h.
IOFD lat::DebugAids::s_stackTraceFd [static, private] |
Definition at line 171 of file DebugAids.h.