]> 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 cc77e988a27221b5d0b845408db7df1720dc81cc..6daf455a06e997bb80c65f1d57ad85fa1802638f 100644 (file)
@@ -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