OSDN Git Service

[PDB] Support dumping injected sources via the DIA reader.
authorZachary Turner <zturner@google.com>
Tue, 13 Mar 2018 17:46:06 +0000 (17:46 +0000)
committerZachary Turner <zturner@google.com>
Tue, 13 Mar 2018 17:46:06 +0000 (17:46 +0000)
commit3eda006779404f4cc69a67dae85664bb40c70790
tree452a8084951bd9d6bef9ed56682081d9f82297eb
parent14d8d03fe257025623022175f4f185fb61e9dbeb
[PDB] Support dumping injected sources via the DIA reader.

Injected sources are basically a way to add actual source file content
to your PDB. Presumably you could use this for shipping your source code
with your debug information, but in practice I can only find this being
used for embedding natvis files inside of PDBs.

In order to effectively test LLVM's natvis file injection, we need a way
to dump the injected sources of a PDB in a way that is authoritative
(i.e. based on Microsoft's understanding of the PDB format, and not
LLVM's). To this end, I've added support for dumping injected sources
via DIA. I made a PDB file that used the /natvis option to generate a
test case.

Differential Revision: https://reviews.llvm.org/D44405

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327428 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/DebugInfo/PDB/DIA/DIAEnumInjectedSources.h [new file with mode: 0644]
include/llvm/DebugInfo/PDB/DIA/DIAInjectedSource.h [new file with mode: 0644]
include/llvm/DebugInfo/PDB/DIA/DIASession.h
include/llvm/DebugInfo/PDB/DIA/DIAUtils.h [new file with mode: 0644]
include/llvm/DebugInfo/PDB/IPDBInjectedSource.h [new file with mode: 0644]
include/llvm/DebugInfo/PDB/IPDBSession.h
include/llvm/DebugInfo/PDB/Native/NativeSession.h
include/llvm/DebugInfo/PDB/PDBExtras.h
include/llvm/DebugInfo/PDB/PDBTypes.h
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/DIA/DIAEnumInjectedSources.cpp [new file with mode: 0644]
lib/DebugInfo/PDB/DIA/DIAInjectedSource.cpp [new file with mode: 0644]
lib/DebugInfo/PDB/DIA/DIASession.cpp
lib/DebugInfo/PDB/Native/NativeSession.cpp
lib/DebugInfo/PDB/PDBExtras.cpp
lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp
test/tools/llvm-pdbdump/Inputs/InjectedSource.pdb [new file with mode: 0644]
test/tools/llvm-pdbdump/injected-sources.test [new file with mode: 0644]
tools/llvm-pdbutil/llvm-pdbutil.cpp