From 11f989320e1085a2fa30cefccbd7da40d8ef650e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Tue, 19 Mar 2013 15:24:10 -0700 Subject: [PATCH] Issue #10296 : Don't handle BreakPoint exceptions using Structured Exception Handling on windows. --- Modules/_ctypes/callproc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index cc77e988a2..6daf455a06 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -401,6 +401,11 @@ static DWORD HandleException(EXCEPTION_POINTERS *ptrs, { *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 -- 2.40.0