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
1 change: 1 addition & 0 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@
<!-- Direct references to cDAC projects for packing -->
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader\Microsoft.Diagnostics.DataContractReader.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Abstractions\Microsoft.Diagnostics.DataContractReader.Abstractions.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Legacy\Microsoft.Diagnostics.DataContractReader.Legacy.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj" Category="tools" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,80 +14,82 @@ public abstract class ContractRegistry
/// <summary>
/// Gets an instance of the Exception contract for the target.
/// </summary>
public abstract IException Exception { get; }
public virtual IException Exception => GetContract<IException>();
/// <summary>
/// Gets an instance of the Loader contract for the target.
/// </summary>
public abstract ILoader Loader { get; }
public virtual ILoader Loader => GetContract<ILoader>();
/// <summary>
/// Gets an instance of the EcmaMetadata contract for the target.
/// </summary>
public abstract IEcmaMetadata EcmaMetadata { get; }
public virtual IEcmaMetadata EcmaMetadata => GetContract<IEcmaMetadata>();
/// <summary>
/// Gets an instance of the Object contract for the target.
/// </summary>
public abstract IObject Object { get; }
public virtual IObject Object => GetContract<IObject>();
/// <summary>
/// Gets an instance of the Thread contract for the target.
/// </summary>
public abstract IThread Thread { get; }
public virtual IThread Thread => GetContract<IThread>();
/// <summary>
/// Gets an instance of the RuntimeTypeSystem contract for the target.
/// </summary>
public abstract IRuntimeTypeSystem RuntimeTypeSystem { get; }
public virtual IRuntimeTypeSystem RuntimeTypeSystem => GetContract<IRuntimeTypeSystem>();
/// <summary>
/// Gets an instance of the DacStreams contract for the target.
/// </summary>
public abstract IDacStreams DacStreams { get; }
public virtual IDacStreams DacStreams => GetContract<IDacStreams>();
/// <summary>
/// Gets an instance of the ExecutionManager contract for the target.
/// </summary>
public abstract IExecutionManager ExecutionManager { get; }
public virtual IExecutionManager ExecutionManager => GetContract<IExecutionManager>();
/// <summary>
/// Gets an instance of the CodeVersions contract for the target.
/// </summary>
public abstract ICodeVersions CodeVersions { get; }
public virtual ICodeVersions CodeVersions => GetContract<ICodeVersions>();
/// <summary>
/// Gets an instance of the PlatformMetadata contract for the target.
/// </summary>
public abstract IPlatformMetadata PlatformMetadata { get; }
public virtual IPlatformMetadata PlatformMetadata => GetContract<IPlatformMetadata>();
/// <summary>
/// Gets an instance of the PrecodeStubs contract for the target.
/// </summary>
public abstract IPrecodeStubs PrecodeStubs { get; }
public virtual IPrecodeStubs PrecodeStubs => GetContract<IPrecodeStubs>();
/// <summary>
/// Gets an instance of the ReJIT contract for the target.
/// </summary>
public abstract IReJIT ReJIT { get; }
public virtual IReJIT ReJIT => GetContract<IReJIT>();
/// <summary>
/// Gets an instance of the StackWalk contract for the target.
/// </summary>
public abstract IStackWalk StackWalk { get; }
public virtual IStackWalk StackWalk => GetContract<IStackWalk>();
/// <summary>
/// Gets an instance of the RuntimeInfo contract for the target.
/// </summary>
public abstract IRuntimeInfo RuntimeInfo { get; }
public virtual IRuntimeInfo RuntimeInfo => GetContract<IRuntimeInfo>();
/// <summary>
/// Gets an instance of the ComWrappers contract for the target.
/// </summary>
public abstract IComWrappers ComWrappers { get; }
public virtual IComWrappers ComWrappers => GetContract<IComWrappers>();
/// Gets an instance of the DebugInfo contract for the target.
/// </summary>
public abstract IDebugInfo DebugInfo { get; }
public virtual IDebugInfo DebugInfo => GetContract<IDebugInfo>();
/// <summary>
/// Gets an instance of the SHash contract for the target.
/// </summary>
public abstract ISHash SHash { get; }
public virtual ISHash SHash => GetContract<ISHash>();
/// <summary>
/// Gets an instance of the GC contract for the target.
/// </summary>
public abstract IGC GC { get; }
public virtual IGC GC => GetContract<IGC>();
/// <summary>
/// Gets an instance of the Notifications contract for the target.
/// </summary>
public abstract INotifications Notifications { get; }
public virtual INotifications Notifications => GetContract<INotifications>();
/// <summary>
/// Gets an instance of the SignatureDecoder contract for the target.
/// </summary>
public abstract ISignatureDecoder SignatureDecoder { get; }
public virtual ISignatureDecoder SignatureDecoder => GetContract<ISignatureDecoder>();

public abstract TContract GetContract<TContract>() where TContract : IContract;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ namespace Microsoft.Diagnostics.DataContractReader;
public interface IContractFactory<out TContract> where TContract : Contracts.IContract
{
TContract CreateContract(Target target, int version);
Type ContractType => typeof(TContract);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Diagnostics.DataContractReader.Legacy;
/// When marshalled to native code, this type is represented as a 64-bit unsigned integer.
/// </summary>
[NativeMarshalling(typeof(ClrDataAddressMarshaller))]
internal struct ClrDataAddress : IEquatable<ClrDataAddress>
public struct ClrDataAddress : IEquatable<ClrDataAddress>
{
public ulong Value;

Expand All @@ -29,7 +29,7 @@ internal struct ClrDataAddress : IEquatable<ClrDataAddress>
}

[CustomMarshaller(typeof(ClrDataAddress), MarshalMode.Default, typeof(ClrDataAddressMarshaller))]
internal static class ClrDataAddressMarshaller
public static class ClrDataAddressMarshaller
{
public static ClrDataAddress ConvertToManaged(ulong address) => new ClrDataAddress(address);
public static ulong ConvertToUnmanaged(ClrDataAddress address) => address.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComClass]
internal sealed unsafe partial class ClrDataFrame : IXCLRDataFrame, IXCLRDataFrame2
public sealed unsafe partial class ClrDataFrame : IXCLRDataFrame, IXCLRDataFrame2
{
private readonly Target _target;
private readonly IXCLRDataFrame? _legacyImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComClass]
internal sealed unsafe partial class ClrDataMethodInstance : IXCLRDataMethodInstance
public sealed unsafe partial class ClrDataMethodInstance : IXCLRDataMethodInstance
{
private readonly Target _target;
private readonly MethodDescHandle _methodDesc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
Expand All @@ -11,7 +11,7 @@
namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComClass]
internal sealed unsafe partial class ClrDataModule : ICustomQueryInterface, IXCLRDataModule, IXCLRDataModule2
public sealed unsafe partial class ClrDataModule : ICustomQueryInterface, IXCLRDataModule, IXCLRDataModule2
{
private readonly TargetPointer _address;
private readonly Target _target;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
Expand All @@ -12,7 +12,7 @@
namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComClass]
internal sealed unsafe partial class ClrDataStackWalk : IXCLRDataStackWalk
public sealed unsafe partial class ClrDataStackWalk : IXCLRDataStackWalk
{
private readonly TargetPointer _threadAddr;
private readonly uint _flags;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.InteropServices.Marshalling;
using Microsoft.Diagnostics.DataContractReader.Contracts;

namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComClass]
internal sealed unsafe partial class ClrDataTask : IXCLRDataTask
public sealed unsafe partial class ClrDataTask : IXCLRDataTask
{
private readonly TargetPointer _address;
private readonly Target _target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.Diagnostics.DataContractReader.Legacy;

internal static class ConversionExtensions
public static class ConversionExtensions
{
private const uint Arm32ThumbBit = 1;

Expand Down Expand Up @@ -86,7 +86,7 @@ public static TargetCodePointer ToTargetCodePointer(this ClrDataAddress address,
/// <summary>
/// Converts a TargetCodePointer to an address TargetPointer, removing any platform-specific bits such as the ARM32 Thumb bit or ARM64 pointer authentication.
/// </summary>
internal static TargetPointer ToAddress(this TargetCodePointer code, Target target)
public static TargetPointer ToAddress(this TargetCodePointer code, Target target)
{
IPlatformMetadata metadata = target.Contracts.PlatformMetadata;
CodePointerFlags flags = metadata.GetCodePointerFlags();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ namespace Microsoft.Diagnostics.DataContractReader.Legacy;

[GeneratedComInterface]
[Guid("471c35b4-7c2f-4ef0-a945-00f8c38056f1")]
internal unsafe partial interface ICLRDataEnumMemoryRegions
public unsafe partial interface ICLRDataEnumMemoryRegions
{
[PreserveSig]
int EnumMemoryRegions(/*ICLRDataEnumMemoryRegionsCallback*/ void* callback, uint miniDumpFlags, /*CLRDataEnumMemoryFlags*/ int clrFlags);
}

[GeneratedComInterface]
[Guid("3e11ccee-d08b-43e5-af01-32717a64da03")]
internal unsafe partial interface ICLRDataTarget
public unsafe partial interface ICLRDataTarget
{
[PreserveSig]
int GetMachineType(uint* machineType);
Expand Down Expand Up @@ -58,7 +58,7 @@ internal unsafe partial interface ICLRDataTarget

[GeneratedComInterface]
[Guid("17d5b8c6-34a9-407f-af4f-a930201d4e02")]
internal unsafe partial interface ICLRContractLocator
public unsafe partial interface ICLRContractLocator
{
[PreserveSig]
int GetContractDescriptor(ulong* contractAddress);
Expand Down
Loading
Loading