File: Contracts\StackWalk\Context\IPlatformContext.cs
Web Access
Project: src\runtime\src\native\managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj (Microsoft.Diagnostics.DataContractReader.Contracts)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Microsoft.Diagnostics.DataContractReader.Contracts.StackWalkHelpers;

public interface IPlatformContext
{
    uint Size { get; }
    uint ContextControlFlags { get; }
    uint FullContextFlags { get; }
    uint AllContextFlags { get; }

    int StackPointerRegister { get; }

    TargetPointer StackPointer { get; set; }
    TargetCodePointer InstructionPointer { get; set; }
    TargetPointer FramePointer { get; set; }

    uint RawContextFlags { get; set; }

    void Unwind(Target target);

    /// <summary>
    /// Clears the hardware single-step (trace) flag in the context, if the architecture
    /// supports a hardware single-step flag. Architectures that emulate single-stepping
    /// throw <see cref="System.NotSupportedException"/>.
    /// </summary>
    void UnsetSingleStepFlag();

    bool TrySetRegister(string name, TargetNUInt value);
    bool TryReadRegister(string name, out TargetNUInt value);

    bool TrySetRegister(int number, TargetNUInt value);
    bool TryReadRegister(int number, out TargetNUInt value);
}