engine: pass argv0 to crash handler setup, which is required for libbacktrace integration

Fix indentation in crash_posix.c
This commit is contained in:
Alibek Omarov 2025-02-09 15:36:40 +03:00
parent bd3634c815
commit 32aa1f91bf
4 changed files with 13 additions and 13 deletions

View file

@ -1043,7 +1043,7 @@ static void Host_InitCommon( int argc, char **argv, const char *progname, qboole
}
if( !Sys_CheckParm( "-noch" ))
Sys_SetupCrashHandler();
Sys_SetupCrashHandler( argv[0] );
#if XASH_DLL_LOADER
host.enabledll = !Sys_CheckParm( "-nodll" );

View file

@ -179,10 +179,10 @@ static inline void Platform_Sleep( int msec )
}
#if XASH_WIN32 || XASH_FREEBSD || XASH_NETBSD || XASH_OPENBSD || XASH_ANDROID || XASH_LINUX || XASH_APPLE
void Sys_SetupCrashHandler( void );
void Sys_SetupCrashHandler( const char *argv0 );
void Sys_RestoreCrashHandler( void );
#else
static inline void Sys_SetupCrashHandler( void )
static inline void Sys_SetupCrashHandler( const char *argv0 )
{
}

View file

@ -206,7 +206,7 @@ void Sys_Crash( int signal, siginfo_t *si, void *context )
#endif // !HAVE_EXECINFO
void Sys_SetupCrashHandler( void )
void Sys_SetupCrashHandler( const char *argv0 )
{
struct sigaction act = { 0 };
act.sa_sigaction = Sys_Crash;

View file

@ -318,7 +318,7 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
return EXCEPTION_CONTINUE_EXECUTION;
}
void Sys_SetupCrashHandler( void )
void Sys_SetupCrashHandler( const char *argv0 )
{
SetErrorMode( SEM_FAILCRITICALERRORS ); // no abort/retry/fail errors
oldFilter = SetUnhandledExceptionFilter( Sys_Crash );