Skip to content
Merged
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
25 changes: 16 additions & 9 deletions src/coreclr/debug/daccess/daccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6078,8 +6078,14 @@ ClrDataAccess::GetMethodVarInfo(MethodDesc* methodDesc,
COUNT_T countNativeVarInfo;
NewHolder<ICorDebugInfo::NativeVarInfo> nativeVars(NULL);

NativeCodeVersion requestedNativeCodeVersion = ExecutionManager::GetNativeCodeVersion(address);
if (requestedNativeCodeVersion.IsNull() || requestedNativeCodeVersion.GetNativeCode() == NULL)
{
return E_INVALIDARG;
}
TADDR nativeCodeStartAddr = PCODEToPINSTR(requestedNativeCodeVersion.GetNativeCode());

DebugInfoRequest request;
TADDR nativeCodeStartAddr = PCODEToPINSTR(methodDesc->GetNativeCode());
request.InitFromStartingAddr(methodDesc, nativeCodeStartAddr);

BOOL success = DebugInfoManager::GetBoundariesAndVars(
Expand All @@ -6088,7 +6094,6 @@ ClrDataAccess::GetMethodVarInfo(MethodDesc* methodDesc,
NULL, NULL,
&countNativeVarInfo, &nativeVars);


if (!success)
{
return E_FAIL;
Expand All @@ -6105,8 +6110,7 @@ ClrDataAccess::GetMethodVarInfo(MethodDesc* methodDesc,

if (codeOffset)
{
*codeOffset = (ULONG32)
(address - nativeCodeStartAddr);
*codeOffset = (ULONG32)(address - nativeCodeStartAddr);
}
return S_OK;
}
Expand All @@ -6125,11 +6129,16 @@ ClrDataAccess::GetMethodNativeMap(MethodDesc* methodDesc,
// Use the DebugInfoStore to get IL->Native maps.
// It doesn't matter whether we're jitted, ngenned etc.

NativeCodeVersion requestedNativeCodeVersion = ExecutionManager::GetNativeCodeVersion(address);
if (requestedNativeCodeVersion.IsNull() || requestedNativeCodeVersion.GetNativeCode() == NULL)
{
return E_INVALIDARG;
}
TADDR nativeCodeStartAddr = PCODEToPINSTR(requestedNativeCodeVersion.GetNativeCode());

DebugInfoRequest request;
TADDR nativeCodeStartAddr = PCODEToPINSTR(methodDesc->GetNativeCode());
request.InitFromStartingAddr(methodDesc, nativeCodeStartAddr);


// Bounds info.
ULONG32 countMapCopy;
NewHolder<ICorDebugInfo::OffsetMapping> mapCopy(NULL);
Expand All @@ -6145,7 +6154,6 @@ ClrDataAccess::GetMethodNativeMap(MethodDesc* methodDesc,
return E_FAIL;
}


// Need to convert map formats.
*numMap = countMapCopy;

Expand Down Expand Up @@ -6179,8 +6187,7 @@ ClrDataAccess::GetMethodNativeMap(MethodDesc* methodDesc,
}
if (codeOffset)
{
*codeOffset = (ULONG32)
(address - nativeCodeStartAddr);
*codeOffset = (ULONG32)(address - nativeCodeStartAddr);
}

*mapAllocated = true;
Expand Down