]> granicus.if.org Git - python/commitdiff
Issue #10296 : Don't handle BreakPoint exceptions using
authorKristján Valur Jónsson <sweskman@gmail.com>
Tue, 19 Mar 2013 22:24:10 +0000 (15:24 -0700)
committerKristján Valur Jónsson <sweskman@gmail.com>
Tue, 19 Mar 2013 22:24:10 +0000 (15:24 -0700)
Structured Exception Handling on windows.

Modules/_ctypes/callproc.c

index 0d4578c5de0c9fc9d4172a79944c0850c66928c2..bf7d8fd75eb436c19295f497d136c24a007575d0 100644 (file)
@@ -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