-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathNativeCodeVersionNode.cs
More file actions
39 lines (32 loc) · 1.77 KB
/
NativeCodeVersionNode.cs
File metadata and controls
39 lines (32 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.Diagnostics.DataContractReader.Data;
internal sealed class NativeCodeVersionNode : IData<NativeCodeVersionNode>
{
static NativeCodeVersionNode IData<NativeCodeVersionNode>.Create(Target target, TargetPointer address) => new NativeCodeVersionNode(target, address);
public NativeCodeVersionNode(Target target, TargetPointer address)
{
Target.TypeInfo type = target.GetTypeInfo(DataType.NativeCodeVersionNode);
Next = target.ReadPointer(address + (ulong)type.Fields[nameof(Next)].Offset);
MethodDesc = target.ReadPointer(address + (ulong)type.Fields[nameof(MethodDesc)].Offset);
NativeCode = target.ReadCodePointer(address + (ulong)type.Fields[nameof(NativeCode)].Offset);
Flags = target.Read<uint>(address + (ulong)type.Fields[nameof(Flags)].Offset);
ILVersionId = target.ReadNUInt(address + (ulong)type.Fields[nameof(ILVersionId)].Offset);
if (type.Fields.ContainsKey(nameof(GCCoverageInfo)))
{
GCCoverageInfo = target.ReadPointer(address + (ulong)type.Fields[nameof(GCCoverageInfo)].Offset);
}
if (type.Fields.ContainsKey(nameof(OptimizationTier)))
{
OptimizationTier = target.Read<uint>(address + (ulong)type.Fields[nameof(OptimizationTier)].Offset);
}
}
public TargetPointer Next { get; init; }
public TargetPointer MethodDesc { get; init; }
public TargetCodePointer NativeCode { get; init; }
public uint Flags { get; init; }
public TargetNUInt ILVersionId { get; init; }
public TargetPointer? GCCoverageInfo { get; init; }
public uint? OptimizationTier { get; init; }
}