add ForceCrashHandler() (same API as the Unix handler)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user