mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-12 15:30:46 +00:00
822ef4e420
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277388 91177308-0d34-0410-b5e6-96231b3b80d8
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
//===- LLVMOutputStyle.h -------------------------------------- *- C++ --*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_LLVMPDBDUMP_LLVMOUTPUTSTYLE_H
|
|
#define LLVM_TOOLS_LLVMPDBDUMP_LLVMOUTPUTSTYLE_H
|
|
|
|
#include "OutputStyle.h"
|
|
|
|
#include "llvm/DebugInfo/CodeView/TypeDumper.h"
|
|
#include "llvm/Support/ScopedPrinter.h"
|
|
|
|
namespace llvm {
|
|
class BitVector;
|
|
namespace pdb {
|
|
class LLVMOutputStyle : public OutputStyle {
|
|
public:
|
|
LLVMOutputStyle(PDBFile &File);
|
|
|
|
Error dump() override;
|
|
|
|
private:
|
|
Error dumpFileHeaders();
|
|
Error dumpStreamSummary();
|
|
Error dumpFreePageMap();
|
|
Error dumpStreamBlocks();
|
|
Error dumpStreamData();
|
|
Error dumpInfoStream();
|
|
Error dumpNamedStream();
|
|
Error dumpTpiStream(uint32_t StreamIdx);
|
|
Error dumpDbiStream();
|
|
Error dumpSectionContribs();
|
|
Error dumpSectionMap();
|
|
Error dumpPublicsStream();
|
|
Error dumpSectionHeaders();
|
|
Error dumpFpoStream();
|
|
|
|
void dumpBitVector(StringRef Name, const BitVector &V);
|
|
|
|
void flush();
|
|
|
|
PDBFile &File;
|
|
ScopedPrinter P;
|
|
codeview::CVTypeDumper TD;
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif
|