Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7901,10 +7901,10 @@ LONG NotifyOfCHFFilterWrapper(
(pThread->GetExceptionState()->GetContextRecord() == NULL) ||
(GetSP(pThread->GetExceptionState()->GetContextRecord()) != GetSP(pExceptionInfo->ContextRecord) ) )
{
LOG((LF_EH, LL_INFO1000, "NotifyOfCHFFilterWrapper: not sending notices. pThread: %0x8", pThread));
LOG((LF_EH, LL_INFO1000, "NotifyOfCHFFilterWrapper: not sending notices. pThread: %p", pThread));
if (pThread)
{
LOG((LF_EH, LL_INFO1000, ", Thread SP: %0x8, Exception SP: %08x",
LOG((LF_EH, LL_INFO1000, ", Thread SP: %p, Exception SP: %p",
pThread->GetExceptionState()->GetContextRecord() ? GetSP(pThread->GetExceptionState()->GetContextRecord()) : NULL,
pExceptionInfo->ContextRecord ? GetSP(pExceptionInfo->ContextRecord) : NULL ));
}
Expand Down
20 changes: 20 additions & 0 deletions src/coreclr/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8217,6 +8217,26 @@ static void NotifyExceptionPassStarted(StackFrameIterator *pThis, Thread *pThrea
pExInfo->m_ExceptionFlags.SetUnwindHasStarted();
EEToDebuggerExceptionInterfaceWrapper::ManagedExceptionUnwindBegin(pThread);
}
else
{
// The debugger explicitly checks that the notification refers to a FuncEvalFrame in case an exception becomes unhandled in a func eval.
// We need to do the notification here before we start propagating the exception through native frames, since that will remove
// all managed frames from the stack and the debugger would not see the failure location.
if (pThis->GetFrameState() == StackFrameIterator::SFITER_FRAME_FUNCTION)
{
Frame* pFrame = pThis->m_crawl.GetFrame();
// If the frame is ProtectValueClassFrame, move to the next one as we want to report the FuncEvalFrame
if (pFrame->GetVTablePtr() == ProtectValueClassFrame::GetMethodFrameVPtr())
{
pFrame = pFrame->PtrNextFrame();
_ASSERTE(pFrame != FRAME_TOP);
}
if ((pFrame->GetVTablePtr() == FuncEvalFrame::GetMethodFrameVPtr()) || (pFrame->GetVTablePtr() == DebuggerU2MCatchHandlerFrame::GetMethodFrameVPtr()))
{
EEToDebuggerExceptionInterfaceWrapper::NotifyOfCHFFilter((EXCEPTION_POINTERS *)&pExInfo->m_ptrs, pFrame);
}
}
}
}
}

Expand Down