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 API for reading/writing PDB Checksum Debug Directory entry #24953
Comments
Looks good.
Can we go back and add this all over the place or is it a breaking change? |
@nguerrera I has already been added all over the place :) |
Oh, yay! |
@karelz When is the next API review session that can pick this up? |
@tmat we should be able to review on Tue. Ping Immo just in case (he's back from vacation on Mon). I'll be on vacation starting Tue. |
@karelz Cool. Thanks |
We just took a look. Looks good as proposed. Questions that came up:
|
The assumption is correct.
Yes, ECMA metadata blob can't be larger than 2GB and Portable PDB is an ECMA metadata blob. |
@terrajobst @karelz Thanks for review. |
Done: dotnet/corefx#26976 |
Background
The CodeView debug directory entry in PE/COFF file associates the PE file with one or more PDBs. The CodeView entry and the PDB both store the same PDB ID (for Portable PDB it's 20B for Windows PDB it's 16B of data). Debuggers, symbol servers and other tools use the PDB ID to match the PE file with the PDB.
Although the PDB ID is good enough for finding the right PDB for the PE file it is not good enough for validating that the PDB has not been maliciously modified. PDB Checksum is a new debug directory record that can be used for such validation.
PDB Checksum comprises of crypto hash algorithm name and the hash of the PDB content. See
Specification for details.
Proposed APIs
In addition add the following API to make it easy for the reader of a Portable PDB to determine where the PDB ID is located within the PDB. This information is required when validating PDB checksum.
The text was updated successfully, but these errors were encountered: