engine: crashhandler: few improvements for win32 crashhandler
* Larger message buffer * Print version at first line * Tell SDL2 to ungrab mouse
This commit is contained in:
parent
02cb12e4b4
commit
166bed732e
1 changed files with 9 additions and 1 deletions
|
@ -80,7 +80,7 @@ static int Sys_ModuleName( HANDLE process, char *name, void *address, int len )
|
||||||
|
|
||||||
static void Sys_StackTrace( PEXCEPTION_POINTERS pInfo )
|
static void Sys_StackTrace( PEXCEPTION_POINTERS pInfo )
|
||||||
{
|
{
|
||||||
char message[1024];
|
char message[8192]; // match *nix Sys_Crash
|
||||||
int len = 0;
|
int len = 0;
|
||||||
size_t i;
|
size_t i;
|
||||||
HANDLE process = GetCurrentProcess();
|
HANDLE process = GetCurrentProcess();
|
||||||
|
@ -148,6 +148,10 @@ static void Sys_StackTrace( PEXCEPTION_POINTERS pInfo )
|
||||||
#elif
|
#elif
|
||||||
#error
|
#error
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
len = Q_snprintf( message, sizeof( message ), "Ver: " XASH_ENGINE_NAME " " XASH_VERSION " (build %i-%s, %s-%s)\n",
|
||||||
|
Q_buildnum(), Q_buildcommit(), Q_buildos(), Q_buildarch() );
|
||||||
|
|
||||||
len += Q_snprintf( message + len, 1024 - len, "Sys_Crash: address %p, code %p\n",
|
len += Q_snprintf( message + len, 1024 - len, "Sys_Crash: address %p, code %p\n",
|
||||||
pInfo->ExceptionRecord->ExceptionAddress, (void*)pInfo->ExceptionRecord->ExceptionCode );
|
pInfo->ExceptionRecord->ExceptionAddress, (void*)pInfo->ExceptionRecord->ExceptionCode );
|
||||||
if( SymGetLineFromAddr64( process, (DWORD64)pInfo->ExceptionRecord->ExceptionAddress, &dline, &line ) )
|
if( SymGetLineFromAddr64( process, (DWORD64)pInfo->ExceptionRecord->ExceptionAddress, &dline, &line ) )
|
||||||
|
@ -275,6 +279,10 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
|
||||||
// check to avoid recursive call
|
// check to avoid recursive call
|
||||||
host.crashed = true;
|
host.crashed = true;
|
||||||
|
|
||||||
|
#ifdef XASH_SDL
|
||||||
|
SDL_SetWindowGrab( host.hWnd, SDL_FALSE );
|
||||||
|
#endif // XASH_SDL
|
||||||
|
|
||||||
#if DBGHELP
|
#if DBGHELP
|
||||||
Sys_StackTrace( pInfo );
|
Sys_StackTrace( pInfo );
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue