[PATCH] D22974: pdbdump: Dump Free Page Map contents.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 13:26:20 PDT 2016


zturner added inline comments.

================
Comment at: lib/DebugInfo/PDB/Raw/PDBFile.cpp:52
@@ +51,3 @@
+// because otherwise the result would be large, as most pages are unused.)
+Expected<std::vector<uint32_t>> PDBFile::getUsedBlockList() const {
+  uint64_t Offset = ContainerLayout.SB->FreeBlockMapBlock * getBlockSize();
----------------
How about adding another field to the `MsfLayout` class called `FreePageMap`?  You will need to set the value in `MsfBuilder::build()` before returning, and you will also need to set it in `PDBFile::parseFileHeaders()`.

This way you wouldn't need to return an `Expected<std::vector<uint32_t>>` but rather a `const BitVector&`, and the reading / writing code would share the same common structures.


https://reviews.llvm.org/D22974





More information about the llvm-commits mailing list