From 255b4a6189bad72e0d6c71583e085ea9e40c4c5d Mon Sep 17 00:00:00 2001 From: Tom McDonald Date: Wed, 29 Apr 2026 17:22:01 -0400 Subject: [PATCH] Fix interpreter breakpoint to pass fIsVEH=FALSE to FirstChanceNativeException Interpreter breakpoints are synthetic software callbacks, not vectored exception handler callbacks. Passing fIsVEH=TRUE (the default) caused SendSetThreadContextNeeded to fire unconditionally for every interpreter breakpoint, allowing the OOP debugger to call SetThreadContext with the synthetic CONTEXT constructed in InterpBreakpoint. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/coreclr/vm/interpexec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coreclr/vm/interpexec.cpp b/src/coreclr/vm/interpexec.cpp index 7fe0a4b3f00955..f6e8947984a19d 100644 --- a/src/coreclr/vm/interpexec.cpp +++ b/src/coreclr/vm/interpexec.cpp @@ -782,11 +782,14 @@ static void InterpBreakpoint(const int32_t *ip, const InterpMethodContextFrame * (void*)GetSP(&ctx), (void*)GetFP(&ctx))); + // Pass fIsVEH=FALSE: interpreter breakpoints are synthetic software callbacks, + // not vectored exception handler callbacks. if (g_pDebugInterface->FirstChanceNativeException( &exceptionRecord, &ctx, STATUS_BREAKPOINT, - pThread)) + pThread, + FALSE /* fIsVEH */)) { InterpThreadContext *pThreadContext = pThread->GetInterpThreadContext();