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
14 changes: 14 additions & 0 deletions src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10330,6 +10330,20 @@ void SoftwareExceptionFrame::UpdateRegDisplay_Impl(const PREGDISPLAY pRD, bool u
}

#ifndef DACCESS_COMPILE

void SoftwareExceptionFrame::SetContext(T_CONTEXT *pContext)
{
LIMITED_METHOD_CONTRACT;

m_Context = *pContext;

#define CALLEE_SAVED_REGISTER(regname) m_ContextPointers.regname = &m_Context.regname;
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER

m_ReturnAddress = ::GetIP(&m_Context);
}

#ifdef TARGET_X86

void SoftwareExceptionFrame::UpdateContextFromTransitionBlock(TransitionBlock *pTransitionBlock)
Expand Down
5 changes: 3 additions & 2 deletions src/coreclr/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,9 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord,
TADDR ssp = 0;
#endif

ResumableFrame resFrame(pContextRecord);
resFrame.Push(pThread);
SoftwareExceptionFrame exceptionFrame;
exceptionFrame.SetContext(pContextRecord);
exceptionFrame.InitAndLink(pThread);

OBJECTREF oref = ExInfo::CreateThrowable(pExceptionRecord, FALSE);
INSTALL_RESUME_AFTER_CATCH_HANDLER_WITH_CONTEXT(pContextRecord, ssp);
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/frames.h
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ class SoftwareExceptionFrame : public Frame
}

void UpdateContextFromTransitionBlock(TransitionBlock *pTransitionBlock);
void SetContext(T_CONTEXT *pContext);
#endif

TADDR GetReturnAddressPtr_Impl()
Expand Down
Loading