diff options
author | Zachary Turner <zturner@google.com> | 2017-06-23 20:18:38 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-06-23 20:18:38 +0000 |
commit | 6c3e41bbd3ac6eff9a16e1722427d67867b2194b (patch) | |
tree | 376811d8ee52000fb4ad40945c20aa1a9a9d77f4 /llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp | |
parent | 7e66b6b8ea727ccd4dfcc899453262eb00098037 (diff) | |
download | bcm5719-llvm-6c3e41bbd3ac6eff9a16e1722427d67867b2194b.tar.gz bcm5719-llvm-6c3e41bbd3ac6eff9a16e1722427d67867b2194b.zip |
[llvm-pdbutil] Dump raw bytes of pdb name map.
This patch dumps the raw bytes of the pdb name map which contains
the mapping of stream name to stream index for the string table
and other reserved streams.
llvm-svn: 306148
Diffstat (limited to 'llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp b/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp index 9761987f076..5cf15685fe3 100644 --- a/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/BytesOutputStyle.cpp @@ -13,6 +13,7 @@ #include "llvm-pdbutil.h" #include "llvm/DebugInfo/MSF/MappedBlockStream.h" +#include "llvm/DebugInfo/PDB/Native/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" #include "llvm/DebugInfo/PDB/Native/RawError.h" #include "llvm/Support/BinaryStreamReader.h" @@ -116,9 +117,25 @@ Error BytesOutputStyle::dump() { dumpStreamBytes(); P.NewLine(); } + + if (opts::bytes::NameMap) { + dumpNameMap(); + P.NewLine(); + } return Error::success(); } +void BytesOutputStyle::dumpNameMap() { + printHeader(P, "Named Stream Map"); + + AutoIndent Indent(P); + + auto &InfoS = Err(File.getPDBInfoStream()); + BinarySubstreamRef NS = InfoS.getNamedStreamsBuffer(); + auto Layout = File.getStreamLayout(StreamPDB); + P.formatMsfStreamData("Named Stream Map", File, Layout, NS); +} + void BytesOutputStyle::dumpBlockRanges(uint32_t Min, uint32_t Max) { printHeader(P, "MSF Blocks"); |