From b990cb95a98cbec8140877e07438f9c5f7ab06ef Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:17:29 +0200 Subject: [PATCH] [macOS] Add SIGTRAP to the crash handler. --- platform/macos/crash_handler_macos.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/macos/crash_handler_macos.mm b/platform/macos/crash_handler_macos.mm index 7c0cab0210ba..c370422bfa73 100644 --- a/platform/macos/crash_handler_macos.mm +++ b/platform/macos/crash_handler_macos.mm @@ -75,6 +75,7 @@ static void handle_crash(int sig) { signal(SIGSEGV, SIG_DFL); signal(SIGFPE, SIG_DFL); signal(SIGILL, SIG_DFL); + signal(SIGTRAP, SIG_DFL); if (OS::get_singleton() == nullptr) { abort(); @@ -193,6 +194,7 @@ static void handle_crash(int sig) { signal(SIGSEGV, SIG_DFL); signal(SIGFPE, SIG_DFL); signal(SIGILL, SIG_DFL); + signal(SIGTRAP, SIG_DFL); #endif disabled = true; @@ -203,5 +205,6 @@ static void handle_crash(int sig) { signal(SIGSEGV, handle_crash); signal(SIGFPE, handle_crash); signal(SIGILL, handle_crash); + signal(SIGTRAP, handle_crash); #endif }