summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristján Valur Jónsson <sweskman@gmail.com>2013-03-19 15:24:10 -0700
committerKristján Valur Jónsson <sweskman@gmail.com>2013-03-19 15:24:10 -0700
commit11f989320e1085a2fa30cefccbd7da40d8ef650e (patch)
tree504ff4229b31963131f860ee9b27df37039cdaec
parent8927e8f4211dc50b87a6365ed7281452a1931ebf (diff)
downloadcpython-git-11f989320e1085a2fa30cefccbd7da40d8ef650e.tar.gz
Issue #10296 : Don't handle BreakPoint exceptions using
Structured Exception Handling on windows.
-rw-r--r--Modules/_ctypes/callproc.c5
1 files changed, 5 insertions, 0 deletions
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