Skip to content
Closed
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
1 change: 1 addition & 0 deletions src/coreclr/vm/FrameTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ FRAME_TYPE_NAME(HijackFrame)
FRAME_TYPE_NAME(PrestubMethodFrame)
FRAME_TYPE_NAME(CallCountingHelperFrame)
FRAME_TYPE_NAME(StubDispatchFrame)
FRAME_TYPE_NAME(CodePointerLookupFrame)
FRAME_TYPE_NAME(ExternalMethodFrame)
FRAME_TYPE_NAME(DynamicHelperFrame)
FRAME_TYPE_NAME(ProtectValueClassFrame)
Expand Down
23 changes: 23 additions & 0 deletions src/coreclr/vm/frames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,29 @@ Frame::Interception StubDispatchFrame::GetInterception_Impl()
return INTERCEPTION_NONE;
}

#ifndef DACCESS_COMPILE
CodePointerLookupFrame::CodePointerLookupFrame(TransitionBlock * pTransitionBlock)
: TransitionFrame(FrameIdentifier::CodePointerLookupFrame), m_pTransitionBlock(dac_cast<TADDR>(pTransitionBlock))
{
LIMITED_METHOD_CONTRACT;

m_pZapModule = NULL;
m_pIndirection = (TADDR)NULL;
}
#endif

BOOL CodePointerLookupFrame::TraceFrame_Impl(Thread *thread, BOOL fromPatch,
TraceDestination *trace, REGDISPLAY *regs)
{
WRAPPER_NO_CONTRACT;

// CodePointerLookupFrame is used for interface dispatch resolution and never directly calls managed code.
// Returning false instructs the debugger to step out of the call that erected this frame.
LOG((LF_CORDB, LL_INFO1000, "CodePointerLookupFrame::TraceFrame: return FALSE\n"));

return FALSE;
}

#ifndef DACCESS_COMPILE
CallCountingHelperFrame::CallCountingHelperFrame(TransitionBlock *pTransitionBlock, MethodDesc *pMD)
: FramedMethodFrame(FrameIdentifier::CallCountingHelperFrame, pTransitionBlock, pMD)
Expand Down
64 changes: 64 additions & 0 deletions src/coreclr/vm/frames.h
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,70 @@ struct cdac_data<StubDispatchFrame>

typedef DPTR(class StubDispatchFrame) PTR_StubDispatchFrame;

//------------------------------------------------------------------------
// CodePointerLookupFrame is used for resolving interface dispatch calls.
// Unlike StubDispatchFrame, it inherits directly from TransitionFrame to
// avoid double GC reporting of argument registers. The calling code handles
// GC reporting via the TransitionFrame base class.
//------------------------------------------------------------------------

class CodePointerLookupFrame : public TransitionFrame
{
TADDR m_pTransitionBlock;

// Indirection cell and containing module.
PTR_Module m_pZapModule;
TADDR m_pIndirection;

public:
CodePointerLookupFrame(TransitionBlock * pTransitionBlock);

TADDR GetTransitionBlock_Impl()
{
LIMITED_METHOD_DAC_CONTRACT;
return m_pTransitionBlock;
}

#ifndef DACCESS_COMPILE
void SetCallSite(Module * pZapModule, TADDR pIndirection)
{
LIMITED_METHOD_CONTRACT;

m_pZapModule = pZapModule;
m_pIndirection = pIndirection;
}
#endif

PCODE GetUnadjustedReturnAddress()
{
LIMITED_METHOD_DAC_CONTRACT;
return GetReturnAddress_Impl();
}

BOOL TraceFrame_Impl(Thread *thread, BOOL fromPatch,
TraceDestination *trace, REGDISPLAY *regs);

int GetFrameType_Impl()
{
LIMITED_METHOD_CONTRACT;
return TYPE_CALL;
}

Interception GetInterception_Impl()
{
LIMITED_METHOD_DAC_CONTRACT;
return INTERCEPTION_NONE;
}

ETransitionType GetTransitionType_Impl()
{
LIMITED_METHOD_DAC_CONTRACT;
return TT_InternalCall;
}
};

typedef DPTR(class CodePointerLookupFrame) PTR_CodePointerLookupFrame;

typedef DPTR(class CallCountingHelperFrame) PTR_CallCountingHelperFrame;

class CallCountingHelperFrame : public FramedMethodFrame
Expand Down
Loading