aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-13 17:57:09 +0000
committerZachary Turner <zturner@google.com>2015-02-13 17:57:09 +0000
commit04b966d9dc4966026fd234ff33200b65fb7e5b5c (patch)
tree34a25367d802e3437ac2a364cbb848328c8bf1b7 /llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp
parent650a61a9438d3979679e19f38ad3972542cb155c (diff)
downloadllvm-04b966d9dc4966026fd234ff33200b65fb7e5b5c.zip
llvm-04b966d9dc4966026fd234ff33200b65fb7e5b5c.tar.gz
llvm-04b966d9dc4966026fd234ff33200b65fb7e5b5c.tar.bz2
llvm-pdbdump: Improve printing of functions and signatures.
This correctly prints the function pointers, and also prints function signatures for symbols as opposed to just types. So actual functions in your program will now be printed with full name and signature, as opposed to just name as before. llvm-svn: 229129
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp
index 69f9284..366c748 100644
--- a/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp
@@ -47,6 +47,26 @@ void PDBSymbolExe::dump(raw_ostream &OS, int Indent,
auto ChildrenEnum = getChildStats(Stats);
OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n";
while (auto Child = ChildrenEnum->getNext()) {
+ // Skip uninteresting types. These are useful to print as part of type
+ // hierarchies, but as general children of the global scope, they are
+ // not very interesting.
+ switch (Child->getSymTag()) {
+ case PDB_SymType::ArrayType:
+ case PDB_SymType::BaseClass:
+ case PDB_SymType::BuiltinType:
+ case PDB_SymType::CompilandEnv:
+ case PDB_SymType::CustomType:
+ case PDB_SymType::Dimension:
+ case PDB_SymType::Friend:
+ case PDB_SymType::ManagedType:
+ case PDB_SymType::VTableShape:
+ case PDB_SymType::PointerType:
+ case PDB_SymType::FunctionSig:
+ case PDB_SymType::FunctionArg:
+ continue;
+ default:
+ break;
+ }
Child->dump(OS, Indent + 4, PDB_DumpLevel::Normal);
OS << "\n";
}