Issue #10296 : Don't handle BreakPoint exceptions using
Structured Exception Handling on windows.
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index cc77e98..6daf455 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -401,6 +401,11 @@
{
*pdw = ptrs->ExceptionRecord->ExceptionCode;
*record = *ptrs->ExceptionRecord;
+ /* We don't want to catch breakpoint exceptions, they are used to attach
+ * a debugger to the process.
+ */
+ if (*pdw == EXCEPTION_BREAKPOINT)
+ return EXCEPTION_CONTINUE_SEARCH;
return EXCEPTION_EXECUTE_HANDLER;
}
#endif