diff options
author | Zachary Turner <zturner@google.com> | 2017-06-09 00:53:59 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-06-09 00:53:59 +0000 |
commit | 28c22c83e3f54638d0eb5383aec72c2c5afb0a36 (patch) | |
tree | d017bd4b053791eb30ffa56eb70377a243a8b3d4 /llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp | |
parent | 85c607ea56bffc7a6dadb587b2abd320e70bf4fa (diff) | |
download | bcm5719-llvm-28c22c83e3f54638d0eb5383aec72c2c5afb0a36.tar.gz bcm5719-llvm-28c22c83e3f54638d0eb5383aec72c2c5afb0a36.zip |
[pdb] Don't crash on unknown debug subsections.
More and more unknown debug subsection kinds are being discovered
so we should make it possible to dump these and display the
bytes.
llvm-svn: 305041
Diffstat (limited to 'llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp index 8d688d094ee..53036994970 100644 --- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp +++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp @@ -91,6 +91,18 @@ public: LazyRandomTypeCollection &IPI) : P(P), TPI(TPI), IPI(IPI) {} + Error visitUnknown(DebugUnknownSubsectionRef &Unknown) override { + if (!opts::checkModuleSubsection(opts::ModuleSubsection::Unknown)) + return Error::success(); + DictScope DD(P, "Unknown"); + P.printHex("Kind", static_cast<uint32_t>(Unknown.kind())); + ArrayRef<uint8_t> Data; + BinaryStreamReader Reader(Unknown.getData()); + consumeError(Reader.readBytes(Data, Reader.bytesRemaining())); + P.printBinaryBlock("Data", Data); + return Error::success(); + } + Error visitLines(DebugLinesSubsectionRef &Lines, const DebugSubsectionState &State) override { if (!opts::checkModuleSubsection(opts::ModuleSubsection::Lines)) |