EXPORT_C #endif void oil_fault_check_enable (void) { #ifndef __SYMBIAN32__ if (enable_level == 0) { #ifndef _WIN32 #ifdef HAVE_SIGACTION memset (&action, 0, sizeof(action)); action.sa_handler = &illegal_instruction_handler; sigaction (SIGILL, &action, &oldaction); #else oldhandler = signal (SIGILL, illegal_instruction_handler); #endif #else oldhandler = SetUnhandledExceptionFilter(illegal_instruction_handler); #endif in_try_block = 0; OIL_INFO("enabling SIGILL handler. Make sure to continue past " "any SIGILL signals caught by gdb."); } enable_level++; #endif }
void _oil_debug_init(void) { const char *envvar; envvar = getenv ("OIL_DEBUG"); if (envvar != NULL) { char *end = NULL; int level; level = strtol (envvar, &end, 0); if (end > envvar) { _oil_debug_level = level; } } OIL_INFO ("liboil-" VERSION " debug init"); }
EXPORT_C #endif void oil_fault_check_disable (void) { #ifndef __SYMBIAN32__ enable_level--; if (enable_level == 0) { #ifndef _WIN32 #ifdef HAVE_SIGACTION sigaction (SIGILL, &oldaction, NULL); #else signal (SIGILL, oldhandler); #endif #else SetUnhandledExceptionFilter(oldhandler); #endif OIL_INFO("disabling SIGILL handler"); } #endif }