[PATCH] D19445: Refactor some more PDB reading code into DebugInfoPDB
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 15:53:35 PDT 2016
zturner created this revision.
zturner added reviewers: majnemer, rnk.
zturner added a subscriber: llvm-commits.
The code that reads the name map and the pdb header information was still lingering in llvm-pdbdump.
The NameMap, it turns out, is a common data structure used in other places in the PDB file as well. So the ability to parse a name map out of a PDB file will be useful for us down the line. So I abstracted that into a `PDBNameMap` class. It's very simple right now, but at least it can be re-used on an arbitrary stream.
I'm also moving towards an approach where we have concrete implementations of each stream type that provides friendly class-like access to the fields of different streams. The basic layout and format of which streams are what is described here [https://github.com/Microsoft/microsoft-pdb/]. Currently llvm-pdbdump has only attempted to parse data out of Stream 1 -- called the PDB Stream -- so I made a class called `PDBInfoStream` which provides convenient access to fields of the PDB stream. In the future we would probably add `PDBDbiStream`, and `PDBModuleStream`, etc.
This patch loses some of the output of llvm-pdbdump -dump-headers, because previously it was dumping every entry in the name map. And now that the name map parsing is handled separately, I felt it wasn't important to print so much detail anymore. Let me know if you disagree.
http://reviews.llvm.org/D19445
Files:
include/llvm/DebugInfo/PDB/Raw/PDBFile.h
include/llvm/DebugInfo/PDB/Raw/PDBInfoStream.h
include/llvm/DebugInfo/PDB/Raw/PDBNameMap.h
include/llvm/DebugInfo/PDB/Raw/PDBRawConstants.h
lib/DebugInfo/PDB/CMakeLists.txt
lib/DebugInfo/PDB/Raw/PDBInfoStream.cpp
lib/DebugInfo/PDB/Raw/PDBNameMap.cpp
test/DebugInfo/PDB/pdbdump-headers.test
tools/llvm-pdbdump/llvm-pdbdump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19445.54743.patch
Type: text/x-patch
Size: 17294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160422/3871fbe0/attachment.bin>
More information about the llvm-commits
mailing list