[macOS] Add SIGTRAP to the crash handler.

This commit is contained in:
bruvzg 2024-02-01 16:17:29 +02:00
parent 9adb7c7d13
commit b990cb95a9
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,7 @@ static void handle_crash(int sig) {
signal(SIGSEGV, SIG_DFL); signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL); signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL); signal(SIGILL, SIG_DFL);
signal(SIGTRAP, SIG_DFL);
if (OS::get_singleton() == nullptr) { if (OS::get_singleton() == nullptr) {
abort(); abort();
@ -193,6 +194,7 @@ void CrashHandler::disable() {
signal(SIGSEGV, SIG_DFL); signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL); signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL); signal(SIGILL, SIG_DFL);
signal(SIGTRAP, SIG_DFL);
#endif #endif
disabled = true; disabled = true;
@ -203,5 +205,6 @@ void CrashHandler::initialize() {
signal(SIGSEGV, handle_crash); signal(SIGSEGV, handle_crash);
signal(SIGFPE, handle_crash); signal(SIGFPE, handle_crash);
signal(SIGILL, handle_crash); signal(SIGILL, handle_crash);
signal(SIGTRAP, handle_crash);
#endif #endif
} }