[PATCH] D43913: Delay writing the PDB build id until just before file commit.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 14:40:05 PST 2018


zturner created this revision.
zturner added reviewers: rnk, compnerd, smeenai, ruiu.
Herald added a subscriber: hiraditya.

The idea here is that we want to be able to create a reproducible hash of the PDB file before and use this as the timestamp field in the PDB and set the timestamp of the executable to match.

In order to do this, we need a way to defer emitting the signature until after everything else in the PDB file has been written.  This way when we hash the PDB file, we hash it as if it had default values (e.g. all zeros) for the build id, and then update the build id field.

For now, this is NFC intended only to make the necessary refactoring to do this kind of deferred emission of the build id possible.  No actual hashing of the PDB is done yet.  We'll do that in a followup.


https://reviews.llvm.org/D43913

Files:
  lld/COFF/PDB.cpp
  llvm/include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
  llvm/include/llvm/DebugInfo/PDB/Native/RawTypes.h
  llvm/include/llvm/Support/BinaryByteStream.h
  llvm/lib/DebugInfo/PDB/Native/InfoStream.cpp
  llvm/lib/DebugInfo/PDB/Native/InfoStreamBuilder.cpp
  llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
  llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43913.136403.patch
Type: text/x-patch
Size: 11981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/b9061a3c/attachment.bin>


More information about the llvm-commits mailing list