[msf] Teach LLVM to parse a split Fpm.
authorZachary Turner <zturner@google.com>
Mon, 1 Aug 2016 21:19:45 +0000 (21:19 +0000)
committerZachary Turner <zturner@google.com>
Mon, 1 Aug 2016 21:19:45 +0000 (21:19 +0000)
commitd3c7b8e303e96fae3ab0c3fc6a42f7f8b87a17e4
tree90e2fca0d8963e50c19084b3bb7551035750aaac
parente594277683e686a30fe63b90ccd43e5cdebe24c3
[msf] Teach LLVM to parse a split Fpm.

The FPM is split at regular intervals across the MSF file, as the MS code
suggests. It turns out that the value of the interval is precisely the
block size. If the block size is 4096, then there are two Fpm pages every
4096 blocks.

So here we teach the PDBFile class to parse a split FPM, and also add more
options when dumping the FPM to display some additional information such
as orphaned pages (pages which the FPM says are allocated, but which
nothing appears to use), use after free pages (pages which the FPM says
are not allocated, but which are referenced by a stream), and multiple use
pages (pages which the FPM says are allocated but are used more than
once).

Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D23022

llvm-svn: 277388
llvm/include/llvm/DebugInfo/PDB/Raw/PDBFile.h
llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
llvm/test/DebugInfo/PDB/pdbdump-headers.test
llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
llvm/tools/llvm-pdbdump/LLVMOutputStyle.h
llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
llvm/tools/llvm-pdbdump/llvm-pdbdump.h