Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
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
6 changes: 3 additions & 3 deletions src/debug/ee/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6319,8 +6319,8 @@ void DebuggerStepper::TrapStepOut(ControllerStackInfo *info, bool fForceTraditio
_ASSERTE(IsCloserToLeaf(dbgLastFP, info->m_activeFrame.fp));
#endif

#ifdef FEATURE_STUBS_AS_IL
if (info->m_activeFrame.md->IsILStub() && info->m_activeFrame.md->AsDynamicMethodDesc()->IsMulticastStub())
#ifdef FEATURE_MULTICASTSTUB_AS_IL
if (info->m_activeFrame.md != nullptr && info->m_activeFrame.md->IsILStub() && info->m_activeFrame.md->AsDynamicMethodDesc()->IsMulticastStub())
{
LOG((LF_CORDB, LL_INFO10000,
"DS::TSO: multicast frame.\n"));
Expand All @@ -6347,7 +6347,7 @@ void DebuggerStepper::TrapStepOut(ControllerStackInfo *info, bool fForceTraditio
break;
}
else
#endif // FEATURE_STUBS_AS_IL
#endif // FEATURE_MULTICASTSTUB_AS_IL
if (info->m_activeFrame.managed)
{
LOG((LF_CORDB, LL_INFO10000,
Expand Down
7 changes: 2 additions & 5 deletions src/debug/ee/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3221,10 +3221,7 @@ CodeRegionInfo CodeRegionInfo::GetCodeRegionInfo(DebuggerJitInfo *dji, MethodDes

if (addr)
{
PCODE pCode = (PCODE)dac_cast<TADDR>(addr);
#ifdef _TARGET_ARM_
pCode |= THUMB_CODE;
#endif
PCODE pCode = PINSTRToPCODE(dac_cast<TADDR>(addr));
codeRegionInfo.InitializeFromStartAddress(pCode);
}

Expand Down Expand Up @@ -11118,7 +11115,7 @@ bool Debugger::HandleIPCEvent(DebuggerIPCEvent * pEvent)
// In the EnC case, if we look for an older version, we need to find the DJI by starting
// address, rather than just by MethodDesc. In the case of generics, we may need to create a DJI, so we
pDJI = pDMI->FindOrCreateInitAndAddJitInfo(pEvent->SetIP.vmMethodDesc.GetRawPtr(),
(TADDR)pEvent->SetIP.startAddress);
PINSTRToPCODE((TADDR)pEvent->SetIP.startAddress));
}

if ((pDJI != NULL) && (pThread != NULL) && (pModule != NULL))
Expand Down
4 changes: 2 additions & 2 deletions src/debug/ee/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ class CodeRegionInfo
{
LIMITED_METHOD_CONTRACT;

PCODE address = (PCODE)addr;
PCODE address = PINSTRToPCODE((TADDR)addr);

if ((address >= m_addrOfHotCode) &&
(address < m_addrOfHotCode + m_sizeOfHotCode))
Expand All @@ -1346,7 +1346,7 @@ class CodeRegionInfo
{
LIMITED_METHOD_CONTRACT;

PCODE address = (PCODE)addr;
PCODE address = PINSTRToPCODE((TADDR)addr);
return (((address >= m_addrOfHotCode) &&
(address < m_addrOfHotCode + m_sizeOfHotCode)) ||
((address >= m_addrOfColdCode) &&
Expand Down
2 changes: 1 addition & 1 deletion src/debug/ee/frameinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ StackWalkAction DebuggerWalkStackProc(CrawlFrame *pCF, void *data)
// The only exception is dynamic methods. We want to report them when SIS is turned on.
if ((md != NULL) && md->IsILStub() && pCF->IsFrameless())
{
#ifdef FEATURE_STUBS_AS_IL
#ifdef FEATURE_MULTICASTSTUB_AS_IL
if(md->AsDynamicMethodDesc()->IsMulticastStub())
{
use = true;
Expand Down
3 changes: 2 additions & 1 deletion src/debug/ee/functioninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ void DebuggerJitInfo::Init(TADDR newAddress)
this->m_addrOfCode = (ULONG_PTR)PTR_TO_CORDB_ADDRESS((BYTE*) newAddress);
this->m_jitComplete = true;

this->m_codeRegionInfo.InitializeFromStartAddress((PCODE)this->m_addrOfCode);
this->m_codeRegionInfo.InitializeFromStartAddress(PINSTRToPCODE((TADDR)this->m_addrOfCode));
this->m_sizeOfCode = this->m_codeRegionInfo.getSizeOfTotalCode();

this->m_encVersion = this->m_methodInfo->GetCurrentEnCVersion();
Expand Down Expand Up @@ -1586,6 +1586,7 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f
//
// We haven't got the lock yet so we'll repeat this lookup once
// we've taken the lock.
ARM_ONLY(_ASSERTE((startAddr & THUMB_CODE) == 1));
DebuggerJitInfo * pResult = FindJitInfo(fd, startAddr);
if (pResult != NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion src/inc/daccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -2414,7 +2414,7 @@ typedef DPTR(RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION;
//----------------------------------------------------------------------------
//
// A PCODE is a valid PC/IP value -- a pointer to an instruction, possibly including some processor mode bits.
// (On ARM, for example, a PCODE value should should have the low-order THUMB_CODE bit set if the code should
// (On ARM, for example, a PCODE value should have the low-order THUMB_CODE bit set if the code should
// be executed in that mode.)
//
typedef TADDR PCODE;
Expand Down
2 changes: 1 addition & 1 deletion src/vm/codeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4166,7 +4166,7 @@ PCODE ExecutionManager::GetCodeStartAddress(PCODE currentPC)
EECodeInfo codeInfo(currentPC);
if (!codeInfo.IsValid())
return NULL;
return (PCODE)codeInfo.GetStartAddress();
return PINSTRToPCODE(codeInfo.GetStartAddress());
}

//**************************************************************************
Expand Down
11 changes: 6 additions & 5 deletions src/vm/comdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,12 @@ FCIMPL1(PCODE, COMDelegate::GetMulticastInvoke, Object* refThisIn)
//Label_nextDelegate:
pCode->EmitLabel(nextDelegate);

#ifdef DEBUGGING_SUPPORTED
pCode->EmitLoadThis();
pCode->EmitLDLOC(dwLoopCounterNum);
pCode->EmitCALL(METHOD__STUBHELPERS__MULTICAST_DEBUGGER_TRACE_HELPER, 2, 0);
#endif // DEBUGGING_SUPPORTED

// compare LoopCounter with InvocationCount. If equal then branch to Label_endOfMethod
pCode->EmitLDLOC(dwLoopCounterNum);
pCode->EmitLDLOC(dwInvocationCountNum);
Expand Down Expand Up @@ -2477,11 +2483,6 @@ FCIMPL1(PCODE, COMDelegate::GetMulticastInvoke, Object* refThisIn)
pCode->EmitADD();
pCode->EmitSTLOC(dwLoopCounterNum);

#ifdef DEBUGGING_SUPPORTED
pCode->EmitLoadThis();
pCode->EmitLDLOC(dwLoopCounterNum);
pCode->EmitCALL(METHOD__STUBHELPERS__MULTICAST_DEBUGGER_TRACE_HELPER, 2, 0);
#endif // DEBUGGING_SUPPORTED

// branch to next delegate
pCode->EmitBR(nextDelegate);
Expand Down
2 changes: 1 addition & 1 deletion src/vm/stubmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ class StubManagerHelpers
Thread::VirtualUnwindCallFrame(&context);
Thread::VirtualUnwindCallFrame(&context);

return pContext->Rip;
return context.Rip;
#elif defined(_TARGET_ARM_)
return *((PCODE *)pContext->R11 + 1);
#elif defined(_TARGET_ARM64_)
Expand Down