This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements support for Embedded Portable PDB (#10199)
* Implements support for Embedded Portable PDB * Remove unnecessary asserts * Add BlobContentId ctor that takes byte[] * Add signature to the embedded blob
- Loading branch information
Showing
18 changed files
with
511 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...tem.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/PortablePdbVersions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace System.Reflection.Metadata | ||
{ | ||
internal static class PortablePdbVersions | ||
{ | ||
/// <summary> | ||
/// Version of Portable PDB format emitted by the writer by default. Metadata version string. | ||
/// </summary> | ||
internal const string DefaultMetadataVersion = "PDB v1.0"; | ||
|
||
/// <summary> | ||
/// Version of Portable PDB format emitted by the writer by default. | ||
/// </summary> | ||
internal const ushort DefaultFormatVersion = 0x0100; | ||
|
||
/// <summary> | ||
/// Minimal supported version of Portable PDB format. | ||
/// </summary> | ||
internal const ushort MinFormatVersion = 0x0100; | ||
|
||
/// <summary> | ||
/// Minimal supported version of Embedded Portable PDB blob. | ||
/// </summary> | ||
internal const ushort MinEmbeddedVersion = 0x0100; | ||
|
||
/// <summary> | ||
/// Version of Embedded Portable PDB blob format emitted by the writer by default. | ||
/// </summary> | ||
internal const ushort DefaultEmbeddedVersion = 0x0100; | ||
|
||
/// <summary> | ||
/// Minimal version of the Embedded Portable PDB blob that the current reader can't interpret. | ||
/// </summary> | ||
internal const ushort MinUnsupportedEmbeddedVersion = 0x0200; | ||
|
||
internal const uint DebugDirectoryEmbeddedSignature = 0x4244504d; | ||
|
||
internal static uint DebugDirectoryEntryVersion(ushort portablePdbVersion) => 'P' << 24 | 'M' << 16 | (uint)portablePdbVersion; | ||
internal static uint DebugDirectoryEmbeddedVersion(ushort portablePdbVersion) => (uint)DefaultEmbeddedVersion << 16 | portablePdbVersion; | ||
internal static string Format(ushort version) => (version >> 8) + "." + (version & 0xff); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.