OSDN Git Service

[codeview] Dump line number and column information.
authorZachary Turner <zturner@google.com>
Fri, 3 Jun 2016 03:25:59 +0000 (03:25 +0000)
committerZachary Turner <zturner@google.com>
Fri, 3 Jun 2016 03:25:59 +0000 (03:25 +0000)
commit7e17f48869976ae906cec779bbf790e6c54913b3
treeef970da944801a61ce7698fc4f6101cbe39f2211
parenta4bbfe59261d66c370374e28c1d35bf2992f1cf9
[codeview] Dump line number and column information.

To facilitate this, a couple of changes had to be made:

1. `ModuleSubstream` got moved from `DebugInfo/PDB` to
`DebugInfo/CodeView`, and various codeview related types are defined
there.  It turns out `DebugInfo/CodeView/Line.h` already defines many of
these structures, but this is really old code that is not endian aware,
doesn't interact well with `StreamInterface` and not very helpful for
getting stuff out of a PDB.  Eventually we should migrate the old readobj
`COFFDumper` code to these new structures, or at least merge their
functionality somehow.

2. A `ModuleSubstream` visitor is introduced.  Depending on where your
module substream array comes from, different subsets of record types can
be expected.  We are already hand parsing these substream arrays in many
places especially in `COFFDumper.cpp`.  In the future we can migrate these
paths to the visitor as well, which should reduce a lot of code in
`COFFDumper.cpp`.

Differential Revision: http://reviews.llvm.org/D20936
Reviewed By: ruiu, majnemer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271621 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/llvm/DebugInfo/CodeView/ModuleSubstream.h [new file with mode: 0644]
include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h [new file with mode: 0644]
include/llvm/DebugInfo/CodeView/StreamArray.h
include/llvm/DebugInfo/CodeView/StreamReader.h
include/llvm/DebugInfo/PDB/Raw/DbiStream.h
include/llvm/DebugInfo/PDB/Raw/ModStream.h
include/llvm/DebugInfo/PDB/Raw/ModuleSubstreamRecord.h [deleted file]
include/llvm/DebugInfo/PDB/Raw/RawTypes.h
lib/DebugInfo/CodeView/CMakeLists.txt
lib/DebugInfo/CodeView/ModuleSubstream.cpp [moved from lib/DebugInfo/PDB/Raw/ModuleSubstreamRecord.cpp with 52% similarity]
lib/DebugInfo/CodeView/ModuleSubstreamVisitor.cpp [new file with mode: 0644]
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/Raw/ModStream.cpp
test/DebugInfo/PDB/pdbdump-headers.test
tools/llvm-pdbdump/llvm-pdbdump.cpp
tools/llvm-readobj/COFFDumper.cpp