diff options
Diffstat (limited to 'tools/llvm-pdbutil/BytesOutputStyle.cpp')
| -rw-r--r-- | tools/llvm-pdbutil/BytesOutputStyle.cpp | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/tools/llvm-pdbutil/BytesOutputStyle.cpp b/tools/llvm-pdbutil/BytesOutputStyle.cpp index 9e5a28c2b98b..2b96c8f986aa 100644 --- a/tools/llvm-pdbutil/BytesOutputStyle.cpp +++ b/tools/llvm-pdbutil/BytesOutputStyle.cpp @@ -15,6 +15,7 @@ #include "llvm/DebugInfo/CodeView/Formatters.h" #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" +#include "llvm/DebugInfo/MSF/MSFCommon.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h" @@ -120,6 +121,11 @@ Error BytesOutputStyle::dump() { P.NewLine(); } + if (opts::bytes::Fpm) { + dumpFpm(); + P.NewLine(); + } + if (!opts::bytes::DumpStreamData.empty()) { dumpStreamBytes(); P.NewLine(); @@ -401,27 +407,6 @@ void BytesOutputStyle::dumpModuleC11() { }); } -static std::string formatChunkKind(DebugSubsectionKind Kind) { - switch (Kind) { - RETURN_CASE(DebugSubsectionKind, None, "none"); - RETURN_CASE(DebugSubsectionKind, Symbols, "symbols"); - RETURN_CASE(DebugSubsectionKind, Lines, "lines"); - RETURN_CASE(DebugSubsectionKind, StringTable, "strings"); - RETURN_CASE(DebugSubsectionKind, FileChecksums, "checksums"); - RETURN_CASE(DebugSubsectionKind, FrameData, "frames"); - RETURN_CASE(DebugSubsectionKind, InlineeLines, "inlinee lines"); - RETURN_CASE(DebugSubsectionKind, CrossScopeImports, "xmi"); - RETURN_CASE(DebugSubsectionKind, CrossScopeExports, "xme"); - RETURN_CASE(DebugSubsectionKind, ILLines, "il lines"); - RETURN_CASE(DebugSubsectionKind, FuncMDTokenMap, "func md token map"); - RETURN_CASE(DebugSubsectionKind, TypeMDTokenMap, "type md token map"); - RETURN_CASE(DebugSubsectionKind, MergedAssemblyInput, - "merged assembly input"); - RETURN_CASE(DebugSubsectionKind, CoffSymbolRVA, "coff symbol rva"); - } - return formatUnknownEnum(Kind); -} - void BytesOutputStyle::dumpModuleC13() { printHeader(P, "Debug Chunks"); @@ -480,6 +465,13 @@ BytesOutputStyle::initializeTypes(uint32_t StreamIdx) { return *TypeCollection; } +void BytesOutputStyle::dumpFpm() { + printHeader(P, "Free Page Map"); + + msf::MSFStreamLayout FpmLayout = File.getFpmStreamLayout(); + P.formatMsfStreamBlocks(File, FpmLayout); +} + void BytesOutputStyle::dumpStreamBytes() { if (StreamPurposes.empty()) discoverStreamPurposes(File, StreamPurposes); @@ -495,7 +487,8 @@ void BytesOutputStyle::dumpStreamBytes() { P.formatLine("Stream {0}: Not present", Spec.SI); continue; } - P.formatMsfStreamData("Data", File, Spec.SI, StreamPurposes[Spec.SI], - Spec.Begin, Spec.Size); + P.formatMsfStreamData("Data", File, Spec.SI, + StreamPurposes[Spec.SI].getShortName(), Spec.Begin, + Spec.Size); } } |
