Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeDefinitionDocuments to custom debug information data #2578

Merged
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 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 @@ -251,6 +256,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