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: v3.2.4rc1~17^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5aed330e37c60b67e9ac87dc5afbf66b21e8a978;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 0d4578c5de..bf7d8fd75e 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -397,6 +397,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