Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 70e26d0

Browse files
committed
Port PR #18129 from 3.0
1 parent de90cbd commit 70e26d0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/debug/ee/debugger.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,10 +3221,7 @@ CodeRegionInfo CodeRegionInfo::GetCodeRegionInfo(DebuggerJitInfo *dji, MethodDes
32213221

32223222
if (addr)
32233223
{
3224-
PCODE pCode = (PCODE)dac_cast<TADDR>(addr);
3225-
#ifdef _TARGET_ARM_
3226-
pCode |= THUMB_CODE;
3227-
#endif
3224+
PCODE pCode = PINSTRToPCODE(dac_cast<TADDR>(addr));
32283225
codeRegionInfo.InitializeFromStartAddress(pCode);
32293226
}
32303227

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

1112411121
if ((pDJI != NULL) && (pThread != NULL) && (pModule != NULL))

src/debug/ee/functioninfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ void DebuggerJitInfo::Init(TADDR newAddress)
12281228
this->m_addrOfCode = (ULONG_PTR)PTR_TO_CORDB_ADDRESS((BYTE*) newAddress);
12291229
this->m_jitComplete = true;
12301230

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

12341234
this->m_encVersion = this->m_methodInfo->GetCurrentEnCVersion();
@@ -1586,6 +1586,7 @@ DebuggerJitInfo *DebuggerMethodInfo::FindOrCreateInitAndAddJitInfo(MethodDesc* f
15861586
//
15871587
// We haven't got the lock yet so we'll repeat this lookup once
15881588
// we've taken the lock.
1589+
ARM_ONLY(_ASSERTE((startAddr & THUMB_CODE) == 1));
15891590
DebuggerJitInfo * pResult = FindJitInfo(fd, startAddr);
15901591
if (pResult != NULL)
15911592
{

0 commit comments

Comments
 (0)