Skip to content

Commit

Permalink
Merge pull request #2578 from davidwengier/AddTypeDefinitionDocuments
Browse files Browse the repository at this point in the history
Add TypeDefinitionDocuments to custom debug information data
  • Loading branch information
siegfriedpammer authored Dec 18, 2021
2 parents 518ade7 + 52628a2 commit f09deb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ICSharpCode.Decompiler/DebugInfo/KnownGuids.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static class KnownGuids
public static readonly Guid CompilationOptions = new Guid("B5FEEC05-8CD0-4A83-96DA-466284BB4BD8");
public static readonly Guid CompilationMetadataReferences = new Guid("7E4D4708-096E-4C5C-AEDA-CB10BA6A740D");
public static readonly Guid TupleElementNames = new Guid("ED9FDF71-8879-4747-8ED3-FE5EDE3CE710");
public static readonly Guid TypeDefinitionDocuments = new Guid("932E74BC-DBA9-4478-8D46-0F32A7BAB3D3");

public static readonly Guid HashAlgorithmSHA1 = new Guid("ff1816ec-aa5e-4d10-87f7-6f4963833460");
public static readonly Guid HashAlgorithmSHA256 = new Guid("8829d00f-11b8-4213-878b-770e8597ac16");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ internal enum CustomDebugInformationKind
MethodSteppingInformation,
CompilationOptions,
CompilationMetadataReferences,
TupleElementNames
TupleElementNames,
TypeDefinitionDocuments
}

static CustomDebugInformationKind GetKind(MetadataReader metadata, GuidHandle h)
Expand Down Expand Up @@ -177,6 +178,10 @@ static CustomDebugInformationKind GetKind(MetadataReader metadata, GuidHandle h)
{
return CustomDebugInformationKind.TupleElementNames;
}
if (KnownGuids.TypeDefinitionDocuments == guid)
{
return CustomDebugInformationKind.TypeDefinitionDocuments;
}

return CustomDebugInformationKind.Unknown;
}
Expand Down Expand Up @@ -257,6 +262,9 @@ public string Kind {
case CustomDebugInformationKind.TupleElementNames:
kindString = $"{MetadataTokens.GetHeapOffset(debugInfo.Kind):X8} - Tuple Element Names (C#) [{ guid}]";
break;
case CustomDebugInformationKind.TypeDefinitionDocuments:
kindString = $"{MetadataTokens.GetHeapOffset(debugInfo.Kind):X8} - Type Definition Documents (C# / VB) [{ guid}]";
break;
default:
kindString = $"{MetadataTokens.GetHeapOffset(debugInfo.Kind):X8} - Unknown [{guid}]";
break;
Expand Down

0 comments on commit f09deb4

Please sign in to comment.