提交 d6324501 编写于 作者: T Tomas Matousek

Factor Windows PDB CDI encoding to a separate shareable type

上级 a2b787e3
......@@ -303,15 +303,20 @@ public void EncCdiAlignment()
new LambdaDebugInfo(-180, new DebugId(2, 0), LambdaDebugInfo.StaticClosureOrdinal));
var debugInfo = new EditAndContinueMethodDebugInformation(1, slots, closures, lambdas);
var records = new ArrayBuilder<Cci.PooledBlobBuilder>();
Cci.CustomDebugInfoWriter.SerializeCustomDebugInformation(debugInfo, records);
var cdi = Cci.CustomDebugInfoWriter.SerializeCustomDebugMetadata(records);
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
Cci.CustomDebugInfoWriter.SerializeCustomDebugInformation(ref cdiEncoder, debugInfo);
var cdi = cdiEncoder.ToArray();
Assert.Equal(2, records.Count);
Assert.Equal(2, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x02, // record count
0x00, 0x00, // alignment
0x04, // version
0x06, // record kind
0x00,
......@@ -324,11 +329,8 @@ public void EncCdiAlignment()
0xFF, 0xC0, 0x00, 0x4E,
0x20, 0x81, 0xC0, 0x00,
0x4E, 0x1F, 0x0A, 0x9A,
0x00, 0x0A, 0x00, 0x00
}, records[0].ToArray());
0x00, 0x0A, 0x00, 0x00,
AssertEx.Equal(new byte[]
{
0x04, // version
0x07, // record kind
0x00,
......@@ -342,7 +344,7 @@ public void EncCdiAlignment()
0x64, 0x80, 0xD2, 0x00,
0x80, 0xDC, 0x03, 0x80,
0x96, 0x02, 0x14, 0x01
}, records[1].ToArray());
}, cdi);
var deserialized = CustomDebugInfoReader.GetCustomDebugInfoRecords(cdi).ToArray();
Assert.Equal(CustomDebugInfoKind.EditAndContinueLocalSlotMap, deserialized[0].Kind);
......@@ -368,6 +370,222 @@ public void EncCdiAlignment()
}, deserialized[1].Data);
}
[Fact]
public void UsingInfo1()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddUsingGroups(new int[0]);
var cdi = cdiEncoder.ToArray();
Assert.Equal(0, cdiEncoder.RecordCount);
Assert.Null(cdi);
}
[Fact]
public void UsingInfo2()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddUsingGroups(new[] { 1, 2, 3, 4 });
var cdi = cdiEncoder.ToArray();
Assert.Equal(1, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x01, // record count
0x00, 0x00, // alignment
0x04, // version
0x00, // record kind
0x00,
0x00,
// aligned record size
0x14, 0x00, 0x00, 0x00,
// payload (4B aligned)
0x04, 0x00, // bucket count
0x01, 0x00, // using count #1
0x02, 0x00, // using count #2
0x03, 0x00, // using count #3
0x04, 0x00, // using count #3
0x00, 0x00 // alignment
}, cdi);
}
[Fact]
public void UsingInfo3()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddUsingGroups(new[] { 1, 2, 3 });
var cdi = cdiEncoder.ToArray();
Assert.Equal(1, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x01, // record count
0x00, 0x00, // alignment
0x04, // version
0x00, // record kind
0x00,
0x00,
// aligned record size
0x10, 0x00, 0x00, 0x00,
// payload (4B aligned)
0x03, 0x00, // bucket count
0x01, 0x00, // using count #1
0x02, 0x00, // using count #2
0x03, 0x00, // using count #3
}, cdi);
}
[Fact]
public void ForwardToModuleInfo()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddForwardModuleInfo(MetadataTokens.MethodDefinitionHandle(0x123456));
var cdi = cdiEncoder.ToArray();
Assert.Equal(1, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x01, // record count
0x00, 0x00, // alignment
0x04, // version
0x02, // record kind
0x00,
0x00,
// aligned record size
0x0C, 0x00, 0x00, 0x00,
// payload (4B aligned)
0x56, 0x34, 0x12, 0x06,
}, cdi);
}
[Fact]
public void ForwardInfo()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddForwardMethodInfo(MetadataTokens.MethodDefinitionHandle(0x123456));
var cdi = cdiEncoder.ToArray();
Assert.Equal(1, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x01, // record count
0x00, 0x00, // alignment
0x04, // version
0x01, // record kind
0x00,
0x00,
// aligned record size
0x0C, 0x00, 0x00, 0x00,
// payload (4B aligned)
0x56, 0x34, 0x12, 0x06,
}, cdi);
}
private static byte[] Pad(int length, byte[] array)
{
var result = new byte[length];
Array.Copy(array, 0, result, 0, array.Length);
return result;
}
[Fact]
public void DynamicLocals()
{
var builder = new BlobBuilder();
var cdiEncoder = new CustomDebugInfoEncoder(builder);
cdiEncoder.AddDynamicLocals(new[]
{
("a", Pad(64, new byte[] { 0x01, 0x02 }), 10, 1),
("b", Pad(64, new byte[] { 0xFF }), 1, 2),
});
var cdi = cdiEncoder.ToArray();
Assert.Equal(1, cdiEncoder.RecordCount);
AssertEx.Equal(new byte[]
{
0x04, // version
0x01, // record count
0x00, 0x00, // alignment
0x04, // version
0x05, // record kind
0x00,
0x00,
// aligned record size
0x9C, 0x01, 0x00, 0x00,
// payload (4B aligned)
// locals count
0x02, 0x00, 0x00, 0x00,
// #1
// flags (64B):
0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// length
0x0A, 0x00, 0x00, 0x00,
// slot index
0x01, 0x00, 0x00, 0x00,
// name (64 UTF16 characters)
0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// #2
// flags
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// length
0x01, 0x00, 0x00, 0x00,
// slot index
0x02, 0x00, 0x00, 0x00,
// name (64 UTF16 characters)
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}, cdi);
}
[Fact]
public void InvalidAlignment1()
{
......@@ -446,7 +664,7 @@ public void InvalidAlignment_KindDoesntSupportAlignment()
var records = CustomDebugInfoReader.GetCustomDebugInfoRecords(bytes).ToArray();
Assert.Equal(1, records.Length);
Assert.Equal(CustomDebugInfoKind.ForwardInfo, records[0].Kind);
Assert.Equal(CustomDebugInfoKind.ForwardMethodInfo, records[0].Kind);
Assert.Equal(4, records[0].Version);
AssertEx.Equal(new byte[] { 0x01, 0x00, 0x00, 0x06 }, records[0].Data);
}
......
......@@ -5,6 +5,7 @@
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using Microsoft.CodeAnalysis.Debugging;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CodeGen
......
......@@ -306,7 +306,8 @@ public void SerializeDebugInfo(IMethodBody methodBody, StandaloneSignatureHandle
return;
}
int methodToken = MetadataTokens.GetToken(_metadataWriter.GetMethodHandle(methodBody.MethodDefinition));
var methodHandle = (MethodDefinitionHandle)_metadataWriter.GetMethodHandle(methodBody.MethodDefinition);
int methodToken = MetadataTokens.GetToken(methodHandle);
OpenMethod(methodToken, methodBody.MethodDefinition);
......@@ -324,7 +325,7 @@ public void SerializeDebugInfo(IMethodBody methodBody, StandaloneSignatureHandle
if (!isIterator && methodBody.ImportScope != null)
{
IMethodDefinition forwardToMethod;
if (customDebugInfoWriter.ShouldForwardNamespaceScopes(Context, methodBody, methodToken, out forwardToMethod))
if (customDebugInfoWriter.ShouldForwardNamespaceScopes(Context, methodBody, methodHandle, out forwardToMethod))
{
if (forwardToMethod != null)
{
......@@ -365,7 +366,7 @@ public void SerializeDebugInfo(IMethodBody methodBody, StandaloneSignatureHandle
bool emitEncInfo = compilationOptions.EnableEditAndContinue && _metadataWriter.IsFullMetadata;
bool emitExternNamespaces;
byte[] blob = customDebugInfoWriter.SerializeMethodDebugInfo(Context, methodBody, methodToken, emitEncInfo, suppressNewCustomDebugInfo, out emitExternNamespaces);
byte[] blob = customDebugInfoWriter.SerializeMethodDebugInfo(Context, methodBody, methodHandle, emitEncInfo, suppressNewCustomDebugInfo, out emitExternNamespaces);
if (blob != null)
{
DefineCustomMetadata("MD2", blob);
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
namespace Microsoft.CodeAnalysis.Debugging
{
internal struct CustomDebugInfoEncoder
{
public BlobBuilder Builder { get; }
private readonly Blob _recordCountFixup;
private int _recordCount;
public CustomDebugInfoEncoder(BlobBuilder builder)
{
Debug.Assert(builder.Count == 0);
Builder = builder;
_recordCount = 0;
// header:
builder.WriteByte(CustomDebugInfoConstants.Version);
// reserve byte for record count:
_recordCountFixup = builder.ReserveBytes(1);
// alignment:
builder.WriteInt16(0);
}
public int RecordCount => _recordCount;
/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
public byte[] ToArray()
{
if (_recordCount == 0)
{
return null;
}
Debug.Assert(_recordCount <= byte.MaxValue);
new BlobWriter(_recordCountFixup).WriteByte((byte)_recordCount);
return Builder.ToArray();
}
public void AddForwardIteratorInfo(string iteratorClassName)
{
Debug.Assert(iteratorClassName != null);
AddRecord(
CustomDebugInfoKind.ForwardIteratorInfo,
iteratorClassName,
(name, builder) =>
{
builder.WriteUTF16(name);
builder.WriteInt16(0);
});
}
public void AddForwardMethodInfo(MethodDefinitionHandle methodHandle)
{
AddRecord(
CustomDebugInfoKind.ForwardMethodInfo,
methodHandle,
(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh)));
}
public void AddForwardModuleInfo(MethodDefinitionHandle methodHandle)
{
AddRecord(
CustomDebugInfoKind.ForwardModuleInfo,
methodHandle,
(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh)));
}
public void AddUsingGroups(IReadOnlyCollection<int> groupSizes)
{
Debug.Assert(groupSizes.Count <= ushort.MaxValue);
// This originally wrote (uint)12, (ushort)1, (ushort)0 in the
// case where usingCounts was empty, but I'm not sure why.
if (groupSizes.Count == 0)
{
return;
}
AddRecord(
CustomDebugInfoKind.UsingGroups,
groupSizes,
(uc, builder) =>
{
builder.WriteUInt16((ushort)uc.Count);
foreach (int usingCount in uc)
{
Debug.Assert(usingCount <= ushort.MaxValue);
builder.WriteUInt16((ushort)usingCount);
}
});
}
public void AddStateMachineHoistedLocalScopes(ImmutableArray<StateMachineHoistedLocalScope> scopes)
{
if (scopes.IsDefaultOrEmpty)
{
return;
}
AddRecord(
CustomDebugInfoKind.StateMachineHoistedLocalScopes,
scopes,
(s, builder) =>
{
builder.WriteInt32(s.Length);
foreach (var scope in s)
{
if (scope.IsDefault)
{
builder.WriteInt32(0);
builder.WriteInt32(0);
}
else
{
// Dev12 C# emits end-inclusive range
builder.WriteInt32(scope.StartOffset);
builder.WriteInt32(scope.EndOffset - 1);
}
}
});
}
internal const int DynamicAttributeSize = 64;
internal const int IdentifierSize = 64;
public void AddDynamicLocals(IReadOnlyCollection<(string LocalName, byte[] Flags, int Count, int SlotIndex)> dynamicLocals)
{
Debug.Assert(dynamicLocals != null);
AddRecord(
CustomDebugInfoKind.DynamicLocals,
dynamicLocals,
(info, builder) =>
{
builder.WriteInt32(dynamicLocals.Count);
foreach (var (name, flags, count, slotIndex) in dynamicLocals)
{
Debug.Assert(flags.Length == DynamicAttributeSize);
Debug.Assert(name.Length <= IdentifierSize);
builder.WriteBytes(flags);
builder.WriteInt32(count);
builder.WriteInt32(slotIndex);
builder.WriteUTF16(name);
builder.WriteBytes(0, sizeof(char) * (IdentifierSize - name.Length));
}
});
}
public void AddRecord<T>(
CustomDebugInfoKind kind,
T debugInfo,
Action<T, BlobBuilder> recordSerializer)
{
int startOffset = Builder.Count;
Builder.WriteByte(CustomDebugInfoConstants.Version);
Builder.WriteByte((byte)kind);
Builder.WriteByte(0);
// alignment size and length (will be patched)
var alignmentSizeAndLengthWriter = new BlobWriter(Builder.ReserveBytes(sizeof(byte) + sizeof(uint)));
recordSerializer(debugInfo, Builder);
int length = Builder.Count - startOffset;
int alignedLength = 4 * ((length + 3) / 4);
byte alignmentSize = (byte)(alignedLength - length);
Builder.WriteBytes(0, alignmentSize);
// Fill in alignment size and length.
// For backward compat, alignment size should only be emitted for records introduced since Roslyn.
alignmentSizeAndLengthWriter.WriteByte((kind > CustomDebugInfoKind.DynamicLocals) ? alignmentSize : (byte)0);
alignmentSizeAndLengthWriter.WriteUInt32((uint)alignedLength);
_recordCount++;
}
}
}
......@@ -7,11 +7,11 @@
/// </summary>
internal enum CustomDebugInfoKind : byte
{
UsingInfo = 0,
ForwardInfo = 1,
ForwardToModuleInfo = 2,
UsingGroups = 0,
ForwardMethodInfo = 1,
ForwardModuleInfo = 2,
StateMachineHoistedLocalScopes = 3,
ForwardIterator = 4,
ForwardIteratorInfo = 4,
DynamicLocals = 5,
EditAndContinueLocalSlotMap = 6,
EditAndContinueLambdaMap = 7,
......
......@@ -358,7 +358,7 @@ private static void SkipRecord(byte[] bytes, ref int offset, int size)
{
switch (record.Kind)
{
case CustomDebugInfoKind.UsingInfo:
case CustomDebugInfoKind.UsingGroups:
if (!groupSizes.IsDefault)
{
throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken)));
......@@ -367,7 +367,7 @@ private static void SkipRecord(byte[] bytes, ref int offset, int size)
groupSizes = DecodeUsingRecord(record.Data);
break;
case CustomDebugInfoKind.ForwardInfo:
case CustomDebugInfoKind.ForwardMethodInfo:
if (!externAliasStrings.IsDefault)
{
throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken)));
......@@ -385,7 +385,7 @@ private static void SkipRecord(byte[] bytes, ref int offset, int size)
break;
case CustomDebugInfoKind.ForwardToModuleInfo:
case CustomDebugInfoKind.ForwardModuleInfo:
if (!externAliasStrings.IsDefault)
{
throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken)));
......
......@@ -11,6 +11,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)CustomDebugInfoConstants.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CustomDebugInfoEncoder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CustomDebugInfoKind.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CustomDebugInfoReader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CustomDebugInfoRecord.cs" />
......
......@@ -58,7 +58,7 @@ public Builder AddUsingInfo(params short[] groupSizes)
// Record header
_bytesBuilder.Add(Version);
_bytesBuilder.Add((byte)CustomDebugInfoKind.UsingInfo);
_bytesBuilder.Add((byte)CustomDebugInfoKind.UsingGroups);
_bytesBuilder.Add(Padding);
_bytesBuilder.Add(Padding);
_bytesBuilder.Add4(recordSize);
......@@ -94,7 +94,7 @@ private Builder AddForward(int targetToken, bool isModuleLevel)
{
// Record header
_bytesBuilder.Add(Version);
_bytesBuilder.Add((byte)(isModuleLevel ? CustomDebugInfoKind.ForwardToModuleInfo : CustomDebugInfoKind.ForwardInfo));
_bytesBuilder.Add((byte)(isModuleLevel ? CustomDebugInfoKind.ForwardModuleInfo : CustomDebugInfoKind.ForwardMethodInfo));
_bytesBuilder.Add(Padding);
_bytesBuilder.Add(Padding);
_bytesBuilder.Add4(12); // Record size, including header.
......
......@@ -278,19 +278,19 @@ private void WriteCustomDebugInfo(byte[] bytes)
{
switch (record.Kind)
{
case CustomDebugInfoKind.UsingInfo:
case CustomDebugInfoKind.UsingGroups:
WriteUsingCustomDebugInfo(record);
break;
case CustomDebugInfoKind.ForwardInfo:
case CustomDebugInfoKind.ForwardMethodInfo:
WriteForwardCustomDebugInfo(record);
break;
case CustomDebugInfoKind.ForwardToModuleInfo:
case CustomDebugInfoKind.ForwardModuleInfo:
WriteForwardToModuleCustomDebugInfo(record);
break;
case CustomDebugInfoKind.StateMachineHoistedLocalScopes:
WriteStateMachineHoistedLocalScopesCustomDebugInfo(record);
break;
case CustomDebugInfoKind.ForwardIterator:
case CustomDebugInfoKind.ForwardIteratorInfo:
WriteForwardIteratorCustomDebugInfo(record);
break;
case CustomDebugInfoKind.DynamicLocals:
......@@ -347,7 +347,7 @@ private void WriteUnknownCustomDebugInfo(CustomDebugInfoRecord record)
/// </remarks>
private void WriteUsingCustomDebugInfo(CustomDebugInfoRecord record)
{
Debug.Assert(record.Kind == CustomDebugInfoKind.UsingInfo);
Debug.Assert(record.Kind == CustomDebugInfoKind.UsingGroups);
_writer.WriteStartElement("using");
......@@ -372,7 +372,7 @@ private void WriteUsingCustomDebugInfo(CustomDebugInfoRecord record)
/// </remarks>
private void WriteForwardCustomDebugInfo(CustomDebugInfoRecord record)
{
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardInfo);
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardMethodInfo);
_writer.WriteStartElement("forward");
......@@ -392,7 +392,7 @@ private void WriteForwardCustomDebugInfo(CustomDebugInfoRecord record)
/// </remarks>
private void WriteForwardToModuleCustomDebugInfo(CustomDebugInfoRecord record)
{
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardToModuleInfo);
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardModuleInfo);
_writer.WriteStartElement("forwardToModule");
......@@ -443,7 +443,7 @@ private void WriteStateMachineHoistedLocalScopesCustomDebugInfo(CustomDebugInfoR
/// </remarks>
private void WriteForwardIteratorCustomDebugInfo(CustomDebugInfoRecord record)
{
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardIterator);
Debug.Assert(record.Kind == CustomDebugInfoKind.ForwardIteratorInfo);
_writer.WriteStartElement("forwardIterator");
......
......@@ -7,7 +7,8 @@
"Microsoft.DiaSymReader.PortablePdb": "1.2.0",
"System.Collections.Immutable": "1.3.1",
"System.Reflection.Metadata": "1.4.2",
"System.Xml.ReaderWriter": "4.3.0"
"System.Xml.ReaderWriter": "4.3.0",
"System.ValueTuple": "4.3.0"
},
"frameworks": {
"netstandard1.3": {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册