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
21 changes: 11 additions & 10 deletions src/coreclr/vm/debugdebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ extern "C" void QCALLTYPE AsyncHelpers_AddContinuationToExInternal(

OBJECTREF pException = (OBJECTREF)exception.Get();
_ASSERTE(pException != NULL);

// populate exception with information from the continuation object
EECodeInfo codeInfo((PCODE)diagnosticIP);
_ASSERTE(codeInfo.IsValid());
Expand Down Expand Up @@ -1082,7 +1083,7 @@ bool CheckNativeToILCacheCore(void* ip, bool fAdjustOffset, uint32_t* pILOffset)
// Check the cache for the IP
int hashCode = MixPointerIntoHash(ip);
StackWalkNativeToILCacheEntry* cacheTable = VolatileLoad(&s_stackWalkCache);

if (cacheTable == NULL)
{
// Cache is not initialized
Expand Down Expand Up @@ -1155,7 +1156,7 @@ void InsertIntoNativeToILCache(void* ip, bool fAdjustOffset, uint32_t dwILOffset
}

// Insert the IP and IL offset into the cache

LONG versionStart = VolatileLoadWithoutBarrier(&s_stackWalkNativeToILCacheVersion);
if ((versionStart & 1) == 1)
{
Expand Down Expand Up @@ -1287,7 +1288,7 @@ size_t WalkILOffsetsCallback(ICorDebugInfo::OffsetMapping *pOffsetMapping, void
// We are looking for an IL offset, and all IL offsets are are about portions of the method that are after the native offset we were passed initially.
// Treat this like a PROLOG and set the IL offset to 0
pWalkData->dwFinalILOffset = 0;
return 1;
return 1;
}
pWalkData->dwILOffsetFound = pOffsetMapping->ilOffset;
}
Expand All @@ -1300,7 +1301,7 @@ size_t WalkILOffsetsCallback(ICorDebugInfo::OffsetMapping *pOffsetMapping, void
if (pWalkData->skipPrologCase)
{
if (pWalkData->prevILOffsetFound != (DWORD)ICorDebugInfo::NO_MAPPING &&
pWalkData->prevILOffsetFound != (DWORD)ICorDebugInfo::PROLOG &&
pWalkData->prevILOffsetFound != (DWORD)ICorDebugInfo::PROLOG &&
pWalkData->prevILOffsetFound != (DWORD)ICorDebugInfo::EPILOG)
{
// We found a valid IL offset after the prolog, so set the final IL offset to the one we found
Expand Down Expand Up @@ -1390,19 +1391,19 @@ void ValidateILOffset(MethodDesc *pFunc, uint8_t* ip)

DWORD dwILOffsetDebugInterface = 0;
DWORD dwILOffsetWalk = 0;

bool bResGetILOffsetFromNative = g_pDebugInterface->GetILOffsetFromNative(
pFunc,
(LPCBYTE)ip,
dwNativeOffset,
&dwILOffsetDebugInterface);

WalkILOffsetsData data(dwNativeOffset);
TADDR startAddress = codeInfo.GetStartAddress();
DebugInfoRequest request;
request.InitFromStartingAddr(codeInfo.GetMethodDesc(), startAddress);
bool bWalkILOffsets;

if (pFunc->IsDynamicMethod())
{
bWalkILOffsets = false;
Expand Down Expand Up @@ -1648,7 +1649,7 @@ int32_t ILToNativeMapArrays::CompareILOffsets(uint32_t ilOffsetA, uint32_t ilOff
{
if (ilOffsetA == ilOffsetB)
{
return 0;
return 0;
}

if (ilOffsetA == (uint32_t)ICorDebugInfo::PROLOG)
Expand Down Expand Up @@ -1740,7 +1741,7 @@ int32_t ILToNativeMapArrays::Partition(uint32_t* rguiNativeOffset, uint32_t *rgu
{
LIMITED_METHOD_CONTRACT;

// Choose the pivot as the middle element and
// Choose the pivot as the middle element and
// pull the pivot the the end of the array.
Swap(rguiNativeOffset, rguiILOffset, low + (high - low) / 2, high);

Expand Down Expand Up @@ -1802,7 +1803,7 @@ void ILToNativeMapArrays::AddEntry(ICorDebugInfo::OffsetMapping *pOffsetMapping)
if (callInstrSequence < 2)
{
// Check to see if we should prefer to drop this mapping in favor of a future mapping.
if ((m_rguiILOffset.GetCount() > 0) &&
if ((m_rguiILOffset.GetCount() > 0) &&
(m_rguiILOffset[m_rguiILOffset.GetCount() - 1] == pOffsetMapping->ilOffset))
{
callInstrSequence = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ public static IEnumerable<object[]> Ctor_Async_TestData()

[ActiveIssue("https://github.com/dotnet/runtime/issues/123979", typeof(PlatformDetection), nameof(PlatformDetection.IsArmProcess))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124015", typeof(PlatformDetection), nameof(PlatformDetection.IsArm64Process))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124044", typeof(PlatformDetection), nameof(PlatformDetection.IsCoreClrInterpreter))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsRuntimeAsyncSupported))]
[MemberData(nameof(Ctor_Async_TestData))]
[MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
Expand Down
Loading