OSDN Git Service

[PDB] Teach libpdb to write DBI Stream ECNames.
authorZachary Turner <zturner@google.com>
Fri, 7 Jul 2017 05:04:36 +0000 (05:04 +0000)
committerZachary Turner <zturner@google.com>
Fri, 7 Jul 2017 05:04:36 +0000 (05:04 +0000)
commit5974613ee57431f9910535a5b5fe47384b12ae7d
tree3e7c970d9e4771f7b677036e768381fd6a8931e7
parent7df94ee855654bafb277b98a9ef94590d9436f19
[PDB] Teach libpdb to write DBI Stream ECNames.

Based strictly on the name, this seems to have something to do
width edit & continue.  The goal of this patch has nothing to do
with supporting edit and continue though.  msvc link.exe writes
very basic information into this area even when *not* compiling
with support for E&C, and so the goal here is to bring lld-link
to parity.  Since we cannot know what assumptions standard tools
make about the content of PDB files, we need to be as close as
possible.

This ECNames data structure is a standard PDB string hash table.
link.exe puts a single string into this hash table, which is the
full path to the PDB file on disk.  It then references this string
from the module descriptor for the compiler generated `* Linker *`
module.

With this patch, lld-link will generate the exact same sequence of
bytes as MSVC link for this subsection for a given object file
input (as reported by `llvm-pdbutil bytes -ec`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307356 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
include/llvm/DebugInfo/PDB/Native/DbiStream.h
include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
lib/DebugInfo/PDB/Native/DbiStream.cpp
lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
test/DebugInfo/PDB/pdbdump-headers.test
tools/llvm-pdbutil/DumpOutputStyle.cpp