Update our signal handler to break into the Windows debugger if it's attached (#11015) d9b3ed9801

Update our signal handler to break into the debugger if it's attached on Windows

Co-authored-by: Josh Jersild <joshua@rive.app>
This commit is contained in:
JoshJRive
2025-11-10 21:02:17 +00:00
parent a43b67a3f3
commit ba00cfa23f
2 changed files with 10 additions and 1 deletions

View File

@@ -1 +1 @@
0743b80014494dd786f750b0a9cf109b32ef573a
d9b3ed98012c56fa6a8b4f586ff3488385f376f9

View File

@@ -175,6 +175,15 @@ static void handle_signal(int signo) noexcept
build_stack(signo);
// set the signal handler to the original
signal(signo, SIG_DFL);
#ifdef _WIN32
if (IsDebuggerPresent())
{
// Cause the debugger to break
DebugBreak();
}
#endif
// re raise the signal
raise(signo);
}