Skip to content

Commit 5aed330

Browse files
committed
Issue #10296 : Don't handle BreakPoint exceptions using
Structured Exception Handling on windows.
1 parent 843fae9 commit 5aed330

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Modules/_ctypes/callproc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,11 @@ static DWORD HandleException(EXCEPTION_POINTERS *ptrs,
397397
{
398398
*pdw = ptrs->ExceptionRecord->ExceptionCode;
399399
*record = *ptrs->ExceptionRecord;
400+
/* We don't want to catch breakpoint exceptions, they are used to attach
401+
* a debugger to the process.
402+
*/
403+
if (*pdw == EXCEPTION_BREAKPOINT)
404+
return EXCEPTION_CONTINUE_SEARCH;
400405
return EXCEPTION_EXECUTE_HANDLER;
401406
}
402407
#endif

0 commit comments

Comments
 (0)