From b0fb8d0be75680f57acfef3990c75243692f1eaa Mon Sep 17 00:00:00 2001
From: FunkyFr3sh <cc.red.alert.1@googlemail.com>
Date: Fri, 26 Apr 2024 02:02:06 +0200
Subject: [PATCH] hook SetUnhandledExceptionFilter for mingw debug build

---
 src/hook.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/hook.c b/src/hook.c
index 3a1b7cd..653e891 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -146,6 +146,9 @@ HOOKLIST g_hook_hooklist[] =
             { "LoadLibraryExW", (PROC)fake_LoadLibraryExW, (PROC*)&real_LoadLibraryExW, HOOK_SKIP_2 },
             { "GetProcAddress", (PROC)fake_GetProcAddress, (PROC*)&real_GetProcAddress, HOOK_SKIP_2 },
             { "GetDiskFreeSpaceA", (PROC)fake_GetDiskFreeSpaceA, (PROC*)&real_GetDiskFreeSpaceA, HOOK_SKIP_2 },
+#if defined(_DEBUG) && defined(__GNUC__)
+            { "SetUnhandledExceptionFilter", (PROC)fake_SetUnhandledExceptionFilter, (PROC*)&real_SetUnhandledExceptionFilter, 0 },
+#endif
             { "", NULL, NULL, 0 }
         }
     },