add ForceCrashHandler() (same API as the Unix handler)

This commit is contained in:
Glenn Maynard
2004-04-12 01:46:14 +00:00
parent 4c28614d13
commit abd4b43719
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -976,3 +976,10 @@ void NORETURN Crash_BacktraceThread( HANDLE hThread )
debug_crash();
}
void ForceCrashHandler( const char *reason )
{
strncpy( g_CrashInfo.m_CrashReason, reason, sizeof(g_CrashInfo.m_CrashReason) );
g_CrashInfo.m_CrashReason[ sizeof(g_CrashInfo.m_CrashReason)-1 ] = 0;
debug_crash();
}
+1
View File
@@ -26,6 +26,7 @@ void NORETURN debug_crash();
void do_backtrace( const void **buf, size_t size, HANDLE hProcess, HANDLE hThread, const CONTEXT *pContext );
void SymLookup( const void *ptr, char *buf );
void ForceCrashHandler( const char *reason );
void NORETURN Crash_BacktraceThread( HANDLE hThread );
#endif