OSDN Git Service

[CodeView] Handle Cross Module Imports and Exports.
authorZachary Turner <zturner@google.com>
Mon, 5 Jun 2017 21:40:33 +0000 (21:40 +0000)
committerZachary Turner <zturner@google.com>
Mon, 5 Jun 2017 21:40:33 +0000 (21:40 +0000)
commit11d1678b59bda51d67991a8a16d02a840ed7242f
tree9985c099d7440b2dd2e7535663a13b611c161628
parent2b704b0e543447f7438e6a59413de58b7408e390
[CodeView] Handle Cross Module Imports and Exports.

While it's not entirely clear why a compiler or linker might
put this information into an object or PDB file, one has been
spotted in the wild which was causing llvm-pdbdump to crash.

This patch adds support for reading-writing these sections.
Since I don't know how to get one of the native tools to
generate this kind of debug info, the only test here is one
in which we feed YAML into the tool to produce a PDB and
then spit out YAML from the resulting PDB and make sure that
it matches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304738 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/llvm/DebugInfo/CodeView/CodeView.h
include/llvm/DebugInfo/CodeView/DebugCrossExSubsection.h [new file with mode: 0644]
include/llvm/DebugInfo/CodeView/DebugCrossImpSubsection.h [new file with mode: 0644]
include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h
include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
lib/DebugInfo/CodeView/CMakeLists.txt
lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp [new file with mode: 0644]
lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp [new file with mode: 0644]
lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp
lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp
lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp
lib/DebugInfo/PDB/Native/PublicsStream.cpp
lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
lib/ObjectYAML/CodeViewYAMLSymbols.cpp
test/DebugInfo/PDB/Inputs/cross-module-import-export.yaml [new file with mode: 0644]
test/DebugInfo/PDB/cross-module-import-export.test [new file with mode: 0644]
tools/llvm-pdbdump/C13DebugFragmentVisitor.cpp
tools/llvm-pdbdump/C13DebugFragmentVisitor.h
tools/llvm-pdbdump/LLVMOutputStyle.cpp
tools/llvm-pdbdump/YAMLOutputStyle.cpp