[llvm] r311116 - Fix a few minor issues when dumping symbols.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 13:04:31 PDT 2017
Author: zturner
Date: Thu Aug 17 13:04:31 2017
New Revision: 311116
URL: http://llvm.org/viewvc/llvm-project?rev=311116&view=rev
Log:
Fix a few minor issues when dumping symbols.
1) We weren't handling symbol types that weren't able to parse,
even if we knew what the leaf type was. This was triggering
when trying to dump /DEBUG:FASTLINK PDBs, where we expect a
certain symbol to show up, but we just don't know how to parse
it.
2) We lost the code for dumping record bytes, so this was added
back.
Modified:
llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def?rev=311116&r1=311115&r2=311116&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def Thu Aug 17 13:04:31 2017
@@ -184,6 +184,8 @@ CV_SYMBOL(S_LDATA_HLSL32 , 0x1163)
CV_SYMBOL(S_GDATA_HLSL32_EX, 0x1164)
CV_SYMBOL(S_LDATA_HLSL32_EX, 0x1165)
+CV_SYMBOL(S_FASTLINK, 0x1167)
+
// Known symbol types
SYMBOL_RECORD(S_END , 0x0006, ScopeEndSym)
SYMBOL_RECORD_ALIAS(S_INLINESITE_END , 0x114e, InlineSiteEnd, ScopeEndSym)
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=311116&r1=311115&r2=311116&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Thu Aug 17 13:04:31 2017
@@ -29,6 +29,7 @@ static StringRef getSymbolKindName(Symbo
#define SYMBOL_RECORD(EnumName, value, name) \
case EnumName: \
return #EnumName;
+#define CV_SYMBOL(EnumName, value) SYMBOL_RECORD(EnumName, value, EnumName)
#include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
default:
llvm_unreachable("Unknown symbol kind!");
@@ -385,6 +386,10 @@ Error MinimalSymbolDumper::visitSymbolBe
}
Error MinimalSymbolDumper::visitSymbolEnd(CVSymbol &Record) {
+ if (RecordBytes) {
+ AutoIndent Indent(P, 7);
+ P.formatBinary("bytes", Record.content(), 0);
+ }
P.Unindent();
return Error::success();
}
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h?rev=311116&r1=311115&r2=311116&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h Thu Aug 17 13:04:31 2017
@@ -25,7 +25,7 @@ public:
MinimalSymbolDumper(LinePrinter &P, bool RecordBytes,
codeview::LazyRandomTypeCollection &Ids,
codeview::LazyRandomTypeCollection &Types)
- : P(P), Ids(Ids), Types(Types) {}
+ : P(P), RecordBytes(RecordBytes), Ids(Ids), Types(Types) {}
Error visitSymbolBegin(codeview::CVSymbol &Record) override;
Error visitSymbolBegin(codeview::CVSymbol &Record, uint32_t Offset) override;
@@ -44,6 +44,7 @@ private:
std::string idIndex(codeview::TypeIndex TI) const;
LinePrinter &P;
+ bool RecordBytes;
codeview::LazyRandomTypeCollection &Ids;
codeview::LazyRandomTypeCollection &Types;
};
More information about the llvm-commits
mailing list