[PATCH] D44810: [PDB] Make LLD PDBs look a little more like Microsoft PDBs
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 15:45:24 PDT 2018
zturner created this revision.
zturner added a reviewer: rnk.
Herald added subscribers: mgrang, hiraditya.
This effort came about when trying to diagnose some problems with LLD PDBs that would cause certain debugging features to not work. It was fairly difficult to investigate why our PDB was behaving differently because there were a lot of differences in the bytes we emitted, most of which were meaningless.
For example, we would output stream A to stream 7 then stream B to stream 12, then construct the name stream map which says Stream A is at 7 and B is at 12.
They would output stream A to stream 15 and stream B to stream 3, then construct the name stream map which says Stream B is at 3 and stream A is at 15.
Since there is a hash table, and buckets, and values in the buckets, and the order of insertion matters, you could end up looking at 2 completely different sequences of bytes that were both ultimately correct.
Issues like this make looking for *important* byte-level differences almost impossible, and it wasn't until I spent considerable time eliminating these superfluous byte level differences that I was ultimately able to find the real problem.
So, the idea is that these changes should aid future investigations while being NFC. Note that none of these changes are necessary for correctness, they are just good to have anyway.
https://reviews.llvm.org/D44810
Files:
lld/COFF/PDB.cpp
lld/test/COFF/pdb-diff.test
lld/test/COFF/pdb-lib.s
lld/test/COFF/pdb-linker-module.test
lld/test/COFF/pdb-same-name.test
lld/test/COFF/pdb.test
llvm/include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h
llvm/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp
llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
llvm/tools/llvm-pdbutil/DumpOutputStyle.h
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
llvm/tools/llvm-pdbutil/llvm-pdbutil.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44810.139526.patch
Type: text/x-patch
Size: 32793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180322/47adaac8/attachment-0001.bin>
More information about the llvm-commits
mailing list