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
2 changes: 1 addition & 1 deletion src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5695,7 +5695,7 @@ void DacDbiInterfaceImpl::GetContext(VMPTR_Thread vmThread, DT_CONTEXT * pContex

// Going through thread Frames and looking for first (deepest one) one that
// that has context available for stackwalking (SP and PC)
// For example: RedirectedThreadFrame, InlinedCallFrame, HelperMethodFrame, ComPlusMethodFrame
// For example: RedirectedThreadFrame, InlinedCallFrame, HelperMethodFrame, CLRToCOMMethodFrame
Frame *frame = pThread->GetFrame();
while (frame != NULL && frame != FRAME_TOP)
{
Expand Down
18 changes: 9 additions & 9 deletions src/coreclr/debug/ee/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ StackTraceTicket::StackTraceTicket(DebuggerUserBreakpoint * p)
// caller wants information about a specific frame.
// CONTEXT* pContext: A pointer to a CONTEXT structure. Can be null,
// we use our temp context.
// bool suppressUMChainFromComPlusMethodFrameGeneric - A ridiculous flag that is trying to narrowly
// bool suppressUMChainFromCLRToCOMMethodFrameGeneric - A ridiculous flag that is trying to narrowly
// target a fix for issue 650903.
// StackTraceTicket - ticket to ensure that we actually have permission for this stacktrace
void ControllerStackInfo::GetStackInfo(
StackTraceTicket ticket,
Thread *thread,
FramePointer targetFP,
CONTEXT *pContext,
bool suppressUMChainFromComPlusMethodFrameGeneric
bool suppressUMChainFromCLRToCOMMethodFrameGeneric
)
{
_ASSERTE(thread != NULL);
Expand Down Expand Up @@ -323,7 +323,7 @@ void ControllerStackInfo::GetStackInfo(
m_targetFP = targetFP;
m_targetFrameFound = (m_targetFP == LEAF_MOST_FRAME);
m_specialChainReason = CHAIN_NONE;
m_suppressUMChainFromComPlusMethodFrameGeneric = suppressUMChainFromComPlusMethodFrameGeneric;
m_suppressUMChainFromCLRToCOMMethodFrameGeneric = suppressUMChainFromCLRToCOMMethodFrameGeneric;

int result = DebuggerWalkStack(thread,
LEAF_MOST_FRAME,
Expand Down Expand Up @@ -387,18 +387,18 @@ StackWalkAction ControllerStackInfo::WalkStack(FrameInfo *pInfo, void *data)
// This is part of the targeted fix for issue 650903 (see the other
// parts in code:TrackUMChain and code:DebuggerStepper::TrapStepOut).
//
// pInfo->fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric has been
// pInfo->fIgnoreThisFrameIfSuppressingUMChainFromCLRToCOMMethodFrameGeneric has been
// set by TrackUMChain to help us remember that the current frame we're looking at is
// ComPlusMethodFrameGeneric (we can't rely on looking at pInfo->frame to check
// this), and i->m_suppressUMChainFromComPlusMethodFrameGeneric has been set by the
// CLRToCOMMethodFrameGeneric (we can't rely on looking at pInfo->frame to check
// this), and i->m_suppressUMChainFromCLRToCOMMethodFrameGeneric has been set by the
// dude initiating this walk to remind us that our goal in life is to do a Step Out
// during managed-only debugging. These two things together tell us we should ignore
// this frame, rather than erroneously identifying it as the target frame.
//
#ifdef FEATURE_COMINTEROP
if(i->m_suppressUMChainFromComPlusMethodFrameGeneric &&
if(i->m_suppressUMChainFromCLRToCOMMethodFrameGeneric &&
(pInfo->chainReason == CHAIN_ENTER_UNMANAGED) &&
(pInfo->fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric))
(pInfo->fIgnoreThisFrameIfSuppressingUMChainFromCLRToCOMMethodFrameGeneric))
{
return SWA_CONTINUE;
}
Expand Down Expand Up @@ -8190,7 +8190,7 @@ TP_RESULT DebuggerThreadStarter::TriggerPatch(DebuggerControllerPatch *patch,
{
// If we've got a frame that is transitioning to native, there's no reason to try to keep tracing. So we
// bail early and save ourselves some effort. This also works around a problem where we deadlock trying to
// do too much work to determine the destination of a ComPlusMethodFrame. (See issue 87103.)
// do too much work to determine the destination of a CLRToCOMMethodFrame. (See issue 87103.)
//
// Note: trace call is still enabled, so we can just ignore this patch and wait for trace call to fire
// again...
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/debug/ee/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ class ControllerStackInfo
// caller wants information about a specific frame.
// CONTEXT* pContext: A pointer to a CONTEXT structure. Can be null,
// we use our temp context.
// bool suppressUMChainFromComPlusMethodFrameGeneric - A ridiculous flag that is trying to narrowly
// bool suppressUMChainFromCLRToCOMMethodFrameGeneric - A ridiculous flag that is trying to narrowly
// target a fix for issue 650903.
// StackTraceTicket - ticket ensuring that we have permission to call this.
void GetStackInfo(
StackTraceTicket ticket,
Thread *thread,
FramePointer targetFP,
CONTEXT *pContext,
bool suppressUMChainFromComPlusMethodFrameGeneric = false
bool suppressUMChainFromCLRToCOMMethodFrameGeneric = false
);

//bool ControllerStackInfo::HasReturnFrame() Returns
Expand All @@ -217,7 +217,7 @@ class ControllerStackInfo
// A ridiculous flag that is targeting a very narrow fix at issue 650903
// (4.5.1/Blue). This is set for the duration of a stackwalk designed to
// help us "Step Out" to a managed frame (i.e., managed-only debugging).
bool m_suppressUMChainFromComPlusMethodFrameGeneric;
bool m_suppressUMChainFromCLRToCOMMethodFrameGeneric;

// Track if this stackwalk actually happened.
// This is used by the StackTraceTicket(ControllerStackInfo * info) ticket.
Expand Down
9 changes: 4 additions & 5 deletions src/coreclr/debug/ee/frameinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ struct DebuggerFrameData
this->info.fIsFilter = false;
#endif // FEATURE_EH_FUNCLETS

// Look strange? Go to definition of this field. I dare you.
this->info.fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric = false;
this->info.fIgnoreThisFrameIfSuppressingUMChainFromCLRToCOMMethodFrameGeneric = false;

#if defined(_DEBUG)
this->previousFP = LEAF_MOST_FRAME;
Expand Down Expand Up @@ -1191,17 +1190,17 @@ StackWalkAction TrackUMChain(CrawlFrame *pCF, DebuggerFrameData *d)

#ifdef FEATURE_COMINTEROP
if ((frame != NULL) &&
(frame->GetVTablePtr() == ComPlusMethodFrame::GetMethodFrameVPtr()))
(frame->GetVTablePtr() == CLRToCOMMethodFrame::GetMethodFrameVPtr()))
{
// This condition is part of the fix for 650903. (See
// code:ControllerStackInfo::WalkStack and code:DebuggerStepper::TrapStepOut
// for the other parts.) Here, we know that the frame we're looking it may be
// a ComPlusMethodFrameGeneric (this info is not otherwise plubmed down into
// a CLRToCOMMethodFrameGeneric (this info is not otherwise plubmed down into
// the walker; even though the walker does get to see "f.frame", that may not
// be "frame"). Given this, if the walker chooses to ignore these frames
// (while doing a Step Out during managed-only debugging), then it can ignore
// this frame.
f.fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric = true;
f.fIgnoreThisFrameIfSuppressingUMChainFromCLRToCOMMethodFrameGeneric = true;
}
#endif // FEATURE_COMINTEROP

Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/debug/ee/frameinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ struct FrameInfo


// A ridiculous flag that is targeting a very narrow fix at issue 650903 (4.5.1/Blue).
// This is set when the currently walked frame is a ComPlusMethodFrameGeneric. If the
// This is set when the currently walked frame is a CLRToCOMMethodFrameGeneric. If the
// dude doing the walking is trying to ignore such frames (see
// code:ControllerStackInfo::m_suppressUMChainFromComPlusMethodFrameGeneric), AND
// code:ControllerStackInfo::m_suppressUMChainFromCLRToCOMMethodFrameGeneric), AND
// this is set, then the walker just continues on to the next frame, without
// erroneously identifying this frame as the target frame. Only used during "Step
// Out" to a managed frame (i.e., managed-only debugging).
bool fIgnoreThisFrameIfSuppressingUMChainFromComPlusMethodFrameGeneric;
bool fIgnoreThisFrameIfSuppressingUMChainFromCLRToCOMMethodFrameGeneric;

// In addition to a Method, a FrameInfo may also represent either a Chain or a Stub (but not both).
// chainReason corresponds to ICorDebugChain::GetReason().
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/vptr_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ VPTR_CLASS(FlatImageLayout)

#ifdef FEATURE_COMINTEROP
VPTR_CLASS(ComMethodFrame)
VPTR_CLASS(ComPlusMethodFrame)
VPTR_CLASS(CLRToCOMMethodFrame)
VPTR_CLASS(ComPrestubMethodFrame)
#endif // FEATURE_COMINTEROP

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ if(CLR_CMAKE_TARGET_ARCH_AMD64)
${ARCH_SOURCES_DIR}/CallDescrWorkerAMD64.asm
${ARCH_SOURCES_DIR}/ComCallPreStub.asm
${ARCH_SOURCES_DIR}/GenericComCallStubs.asm
${ARCH_SOURCES_DIR}/GenericComPlusCallStubs.asm
${ARCH_SOURCES_DIR}/GenericCLRToCOMCallStubs.asm
${ARCH_SOURCES_DIR}/getstate.asm
${ARCH_SOURCES_DIR}/JitHelpers_Fast.asm
${ARCH_SOURCES_DIR}/JitHelpers_FastWriteBarriers.asm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern CLRToCOMWorker:proc
extern ProcessCLRException:proc


NESTED_ENTRY GenericComPlusCallStub, _TEXT, ProcessCLRException
NESTED_ENTRY GenericCLRToCOMCallStub, _TEXT, ProcessCLRException

PROLOG_WITH_TRANSITION_BLOCK 8

Expand All @@ -38,7 +38,7 @@ NESTED_ENTRY GenericComPlusCallStub, _TEXT, ProcessCLRException

EPILOG_WITH_TRANSITION_BLOCK_RETURN

NESTED_END GenericComPlusCallStub, _TEXT
NESTED_END GenericCLRToCOMCallStub, _TEXT

endif ; FEATURE_COMINTEROP

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/arm/asmconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ ASMCONSTANTS_C_ASSERT(SIZEOF__ComMethodFrame == sizeof(ComMethodFrame))
#define UnmanagedToManagedFrame__m_pvDatum 0x08
ASMCONSTANTS_C_ASSERT(UnmanagedToManagedFrame__m_pvDatum == offsetof(UnmanagedToManagedFrame, m_pvDatum))

// In ComCallPreStub and GenericComPlusCallStub, we setup R12 to contain address of ComCallMethodDesc after doing the following:
// In ComCallPreStub and GenericCLRToCOMCallStub, we setup R12 to contain address of ComCallMethodDesc after doing the following:
//
// mov r12, pc
//
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/vm/arm64/asmhelpers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ NoFloatingPointRetVal
LEAF_END

; ------------------------------------------------------------------
; GenericComPlusCallStub that erects a ComPlusMethodFrame and calls into the runtime
; GenericCLRToCOMCallStub that erects a CLRToCOMMethodFrame and calls into the runtime
; (CLRToCOMWorker) to dispatch rare cases of the interface call.
;
; On entry:
Expand All @@ -398,14 +398,14 @@ NoFloatingPointRetVal
; On exit:
; x0/x1/s0-s3/d0-d3 set to return value of the call as appropriate
;
NESTED_ENTRY GenericComPlusCallStub
NESTED_ENTRY GenericCLRToCOMCallStub

PROLOG_WITH_TRANSITION_BLOCK ASM_ENREGISTERED_RETURNTYPE_MAXSIZE

add x0, sp, #__PWTB_TransitionBlock ; pTransitionBlock
mov x1, x12 ; pMethodDesc

; Call CLRToCOMWorker(TransitionBlock *, ComPlusCallMethodDesc *).
; Call CLRToCOMWorker(TransitionBlock *, CLRToCOMCallMethodDesc *).
; This call will set up the rest of the frame (including the vfptr, the GS cookie and
; linking to the thread), make the client call and return with correct registers set
; (x0/x1/s0-s3/d0-d3 as appropriate).
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/vm/cgensys.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CrawlFrame;
struct EE_ILEXCEPTION_CLAUSE;
struct TransitionBlock;
struct VASigCookie;
class ComPlusCallMethodDesc;
class CLRToCOMCallMethodDesc;

#include <cgencpu.h>

Expand All @@ -33,8 +33,8 @@ void CallJitEHFinally(CrawlFrame* pCf, BYTE* startPC, EE_ILEXCEPTION_CLAUSE *EHC
#endif // TARGET_X86

#ifdef FEATURE_COMINTEROP
extern "C" UINT32 STDCALL CLRToCOMWorker(TransitionBlock * pTransitionBlock, ComPlusCallMethodDesc * pMD);
extern "C" void GenericComPlusCallStub(void);
extern "C" UINT32 STDCALL CLRToCOMWorker(TransitionBlock * pTransitionBlock, CLRToCOMCallMethodDesc * pMD);
extern "C" void GenericCLRToCOMCallStub(void);

extern "C" void GenericComCallStub(void);
#endif // FEATURE_COMINTEROP
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ class LayoutEEClass : public EEClass
class UMThunkMarshInfo;

#ifdef FEATURE_COMINTEROP
struct ComPlusCallInfo;
struct CLRToCOMCallInfo;
#endif // FEATURE_COMINTEROP

class DelegateEEClass : public EEClass
Expand All @@ -1912,7 +1912,7 @@ class DelegateEEClass : public EEClass
Volatile<PCODE> m_pMarshalStub;

#ifdef FEATURE_COMINTEROP
ComPlusCallInfo *m_pComPlusCallInfo;
CLRToCOMCallInfo *m_pCLRToCOMCallInfo;
#endif // FEATURE_COMINTEROP

PTR_MethodDesc GetInvokeMethod()
Expand Down
Loading