mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- windows: create stub functions for the crash logger for ARM. this invites the possibility, hopefully, that if someone is inclined, to actually make one. it also cleans up the code a little bit for intel.
This commit is contained in:
parent
499df03821
commit
54fba4d642
3 changed files with 8 additions and 7 deletions
|
@ -455,6 +455,7 @@ if (NOT ${ZDOOM_TARGET_ARCH} MATCHES "arm" )
|
||||||
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash.cpp )
|
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash.cpp )
|
||||||
endif()
|
endif()
|
||||||
if (MSVC AND ${ZDOOM_TARGET_ARCH} MATCHES "arm")
|
if (MSVC AND ${ZDOOM_TARGET_ARCH} MATCHES "arm")
|
||||||
|
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash_arm.cpp )
|
||||||
add_definitions( -DNO_SSE -D__ARM__ -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
add_definitions( -DNO_SSE -D__ARM__ -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
|
||||||
#if !defined _WIN32 && !defined __APPLE__
|
#if !defined _WIN32 && !defined __APPLE__ || (defined _WIN32 && !defined _M_ARM64)
|
||||||
|
|
||||||
#ifdef NO_CLOCK_GETTIME
|
#ifdef NO_CLOCK_GETTIME
|
||||||
class cycle_t
|
class cycle_t
|
||||||
|
|
|
@ -1076,9 +1076,7 @@ void CALLBACK ExitFatally (ULONG_PTR dummy)
|
||||||
SetUnhandledExceptionFilter (ExitMessedUp);
|
SetUnhandledExceptionFilter (ExitMessedUp);
|
||||||
I_ShutdownGraphics ();
|
I_ShutdownGraphics ();
|
||||||
RestoreConView ();
|
RestoreConView ();
|
||||||
#ifndef _M_ARM64
|
|
||||||
DisplayCrashLog ();
|
DisplayCrashLog ();
|
||||||
#endif
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1135,6 +1133,12 @@ LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
||||||
}
|
}
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
}
|
}
|
||||||
|
#else // !_M_ARM64
|
||||||
|
// stub this function for ARM64
|
||||||
|
LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
||||||
|
{
|
||||||
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
|
}
|
||||||
#endif // !_M_ARM64
|
#endif // !_M_ARM64
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -1159,11 +1163,7 @@ static void infiniterecursion(int foo)
|
||||||
// which offers the very important feature to open a debugger and see the crash in context right away.
|
// which offers the very important feature to open a debugger and see the crash in context right away.
|
||||||
CUSTOM_CVAR(Bool, disablecrashlog, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Bool, disablecrashlog, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
#ifndef _M_ARM64
|
|
||||||
SetUnhandledExceptionFilter(!*self ? CatchAllExceptions : nullptr);
|
SetUnhandledExceptionFilter(!*self ? CatchAllExceptions : nullptr);
|
||||||
#else
|
|
||||||
SetUnhandledExceptionFilter(nullptr);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue