Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into cdac-precode-stubs
  • Loading branch information
lambdageek committed Oct 18, 2024
commit f56ae2b7da5daa43aa850a17a0a813f205fea188
6 changes: 6 additions & 0 deletions src/coreclr/debug/runtimeinfo/datadescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ CDAC_TYPE_BEGIN(CodePointer)
CDAC_TYPE_SIZE(sizeof(PCODE))
CDAC_TYPE_END(CodePointer)

CDAC_TYPE_BEGIN(MethodDescVersioningState)
CDAC_TYPE_INDETERMINATE(MethodDescVersioningState)
CDAC_TYPE_FIELD(MethodDescVersioningState, /*pointer*/, NativeCodeVersionNode, cdac_data<MethodDescVersioningState>::NativeCodeVersionNode)
CDAC_TYPE_FIELD(MethodDescVersioningState, /*uint8*/, Flags, cdac_data<MethodDescVersioningState>::Flags)
CDAC_TYPE_END(MethodDescVersioningState)

CDAC_TYPE_BEGIN(PrecodeMachineDescriptor)
CDAC_TYPE_INDETERMINATE(PrecodeMachineDescriptor)
CDAC_TYPE_FIELD(PrecodeMachineDescriptor, /*uintptr*/, CodePointerToInstrPointerMask, offsetof(PrecodeMachineDescriptor, CodePointerToInstrPointerMask))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ internal abstract class ContractRegistry
/// </summary>
public abstract IExecutionManager ExecutionManager { get; }
/// <summary>
/// Gets an instance of the CodeVersions contract for the target.
/// </summary>
public abstract ICodeVersions CodeVersions { get; }
/// Gets an instance of the PrecodeStubs contract for the target.
/// </summary>
public abstract IPrecodeStubs PrecodeStubs { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public CachingContractRegistry(Target target, TryGetContractVersionDelegate tryG
[typeof(IRuntimeTypeSystem)] = new RuntimeTypeSystemFactory(),
[typeof(IDacStreams)] = new DacStreamsFactory(),
[typeof(IExecutionManager)] = new ExecutionManagerFactory(),
[typeof(ICodeVersions)] = new CodeVersionsFactory(),
[typeof(IPrecodeStubs)] = new PrecodeStubsFactory(),
};
configureFactories?.Invoke(_factories);
Expand All @@ -46,6 +47,7 @@ public CachingContractRegistry(Target target, TryGetContractVersionDelegate tryG
public override IRuntimeTypeSystem RuntimeTypeSystem => GetContract<IRuntimeTypeSystem>();
public override IDacStreams DacStreams => GetContract<IDacStreams>();
public override IExecutionManager ExecutionManager => GetContract<IExecutionManager>();
public override ICodeVersions CodeVersions => GetContract<ICodeVersions>();
public override IPrecodeStubs PrecodeStubs => GetContract<IPrecodeStubs>();

private TContract GetContract<TContract>() where TContract : IContract
Expand Down
2 changes: 2 additions & 0 deletions src/native/managed/cdacreader/tests/TestPlaceholderTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public TestRegistry() { }
internal Lazy<Contracts.IRuntimeTypeSystem>? RuntimeTypeSystemContract { get; set; }
internal Lazy<Contracts.IDacStreams>? DacStreamsContract { get; set; }
internal Lazy<Contracts.IExecutionManager> ExecutionManagerContract { get; set; }
internal Lazy<Contracts.ICodeVersions>? CodeVersionsContract { get; set; }
internal Lazy<Contracts.IPrecodeStubs>? PrecodeStubsContract { get; set; }

public override Contracts.IException Exception => ExceptionContract.Value ?? throw new NotImplementedException();
Expand All @@ -220,6 +221,7 @@ public TestRegistry() { }
public override Contracts.IRuntimeTypeSystem RuntimeTypeSystem => RuntimeTypeSystemContract.Value ?? throw new NotImplementedException();
public override Contracts.IDacStreams DacStreams => DacStreamsContract.Value ?? throw new NotImplementedException();
public override Contracts.IExecutionManager ExecutionManager => ExecutionManagerContract.Value ?? throw new NotImplementedException();
public override Contracts.ICodeVersions CodeVersions => CodeVersionsContract.Value ?? throw new NotImplementedException();
public override Contracts.IPrecodeStubs PrecodeStubs => PrecodeStubsContract.Value ?? throw new NotImplementedException();
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.