Skip to content

Commit 6be5694

Browse files
Max CharlambCopilot
andcommitted
Fix ResolveGCInfo missing eman/cbh declarations
The ResolveGCInfo helper method referenced eman (IExecutionManager) and cbh (CodeBlockHandle) without declaring them as local variables. Add the necessary variable declarations to resolve the build break. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c06f749 commit 6be5694

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy

src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7390,11 +7390,14 @@ int ISOSDacInterface17.GetStressLogMemoryRanges(DacComNullableByRef<ISOSMemoryEn
73907390

73917391
private (Contracts.IGCInfoHandle handle, Contracts.IGCInfo gcInfo) ResolveGCInfo(ClrDataAddress ip)
73927392
{
7393+
IExecutionManager eman = _target.Contracts.ExecutionManager;
7394+
TargetCodePointer targetCodePointer = ip.ToTargetCodePointer(_target);
7395+
CodeBlockHandle? cbh = eman.GetCodeBlockHandle(targetCodePointer);
73937396
if (cbh is null)
73947397
throw new ArgumentException("No code block found for the given IP");
73957398

73967399
eman.GetGCInfo(cbh.Value, out TargetPointer pGcInfo, out uint gcVersion);
7397-
Contracts.CodeKind codeKind = eman.GetCodeKind(ip.ToTargetCodePointer(_target));
7400+
Contracts.CodeKind codeKind = eman.GetCodeKind(targetCodePointer);
73987401
Contracts.IGCInfo gcInfo = _target.Contracts.GCInfo;
73997402
Contracts.IGCInfoHandle handle = codeKind == Contracts.CodeKind.Interpreter
74007403
? gcInfo.DecodeInterpreterGCInfo(pGcInfo, gcVersion)

0 commit comments

Comments
 (0)