Esempio n. 1
0
/*
================
sig_handler
================
*/
static void sig_handler( int signum, siginfo_t *info, void *context ) {
	static bool double_fault = false;
	
	if ( double_fault ) {
		Sys_Printf( "double fault %s, bailing out\n", strsignal( signum ) );
		Posix_Exit( signum );
	}
	
	double_fault = true;
	
	// NOTE: see sigaction man page, could verbose the whole siginfo_t and print human readable si_code
	Sys_Printf( "signal caught: %s\nsi_code %d\n", strsignal( signum ), info->si_code );	
	
#ifndef ID_BT_STUB
	Sys_Printf( "callstack:\n%s", Sys_GetCallStackCurStr( 30 ) );
#endif

	if ( fatalError[ 0 ] ) {
		Sys_Printf( "Was in fatal error shutdown: %s\n", fatalError );
	}
	
	Sys_Printf( "Trying to exit gracefully..\n" );
	
	Posix_SetExit( signum );
	
	common->Quit();
}
Esempio n. 2
0
const char* idSysLocal::GetCallStackCurStr( int depth )
{
	return Sys_GetCallStackCurStr( depth );
}
/*
==================
Sys_GetCallStackCurAddressStr
==================
*/
const char *Sys_GetCallStackCurAddressStr( int depth ) {
	return Sys_GetCallStackCurStr( depth );
}