From: Kristján Valur Jónsson Date: Tue, 19 Mar 2013 22:24:10 +0000 (-0700) Subject: Issue #10296 : Don't handle BreakPoint exceptions using X-Git-Tag: v2.7.4rc1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11f989320e1085a2fa30cefccbd7da40d8ef650e;p=python 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 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