mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-08 12:10:42 +01:00
whb: Fix exception handlers to be globally registered.
Was previously only registered for current thread.
This commit is contained in:
parent
710ce964c8
commit
33bff6ccb9
@ -14,6 +14,15 @@ extern "C" {
|
|||||||
|
|
||||||
typedef BOOL (*OSExceptionCallbackFn)(OSContext *context);
|
typedef BOOL (*OSExceptionCallbackFn)(OSContext *context);
|
||||||
|
|
||||||
|
typedef enum OSExceptionMode
|
||||||
|
{
|
||||||
|
OS_EXCEPTION_MODE_SYSTEM = 0,
|
||||||
|
OS_EXCEPTION_MODE_THREAD = 1,
|
||||||
|
OS_EXCEPTION_MODE_GLOBAL = 2,
|
||||||
|
OS_EXCEPTION_MODE_THREAD_ALL_CORES = 3,
|
||||||
|
OS_EXCEPTION_MODE_GLOBAL_ALL_CORES = 4,
|
||||||
|
} OSExceptionMode;
|
||||||
|
|
||||||
typedef enum OSExceptionType
|
typedef enum OSExceptionType
|
||||||
{
|
{
|
||||||
OS_EXCEPTION_TYPE_SYSTEM_RESET = 0,
|
OS_EXCEPTION_TYPE_SYSTEM_RESET = 0,
|
||||||
@ -38,7 +47,7 @@ OSSetExceptionCallback(OSExceptionType exceptionType,
|
|||||||
OSExceptionCallbackFn callback);
|
OSExceptionCallbackFn callback);
|
||||||
|
|
||||||
OSExceptionCallbackFn
|
OSExceptionCallbackFn
|
||||||
OSSetExceptionCallbackEx(UNKNOWN_ARG,
|
OSSetExceptionCallbackEx(OSExceptionMode mode,
|
||||||
OSExceptionType exceptionType,
|
OSExceptionType exceptionType,
|
||||||
OSExceptionCallbackFn callback);
|
OSExceptionCallbackFn callback);
|
||||||
|
|
||||||
|
@ -250,9 +250,9 @@ handleProgram(OSContext *context)
|
|||||||
BOOL
|
BOOL
|
||||||
WHBInitCrashHandler()
|
WHBInitCrashHandler()
|
||||||
{
|
{
|
||||||
OSSetExceptionCallback(OS_EXCEPTION_TYPE_ALIGNMENT, handleAlignment);
|
OSSetExceptionCallbackEx(OS_EXCEPTION_MODE_GLOBAL, OS_EXCEPTION_TYPE_ALIGNMENT, handleAlignment);
|
||||||
OSSetExceptionCallback(OS_EXCEPTION_TYPE_DSI, handleDSI);
|
OSSetExceptionCallbackEx(OS_EXCEPTION_MODE_GLOBAL, OS_EXCEPTION_TYPE_DSI, handleDSI);
|
||||||
OSSetExceptionCallback(OS_EXCEPTION_TYPE_ISI, handleISI);
|
OSSetExceptionCallbackEx(OS_EXCEPTION_MODE_GLOBAL, OS_EXCEPTION_TYPE_ISI, handleISI);
|
||||||
OSSetExceptionCallback(OS_EXCEPTION_TYPE_PROGRAM, handleProgram);
|
OSSetExceptionCallbackEx(OS_EXCEPTION_MODE_GLOBAL, OS_EXCEPTION_TYPE_PROGRAM, handleProgram);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user