[llvm] r229076 - llvm-pdbdump: Add more comprehensive dumping of symbol types.

Zachary Turner zturner at google.com
Thu Feb 12 23:40:04 PST 2015


Author: zturner
Date: Fri Feb 13 01:40:03 2015
New Revision: 229076

URL: http://llvm.org/viewvc/llvm-project?rev=229076&view=rev
Log:
llvm-pdbdump: Add more comprehensive dumping of symbol types.

In particular this patch adds the ability to dump complete
function signature information including argument types as
correctly formatted strings.  A side effect of this is that
almost all symbol and meta types are now formatted.

Modified:
    llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBExtras.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp
    llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBSession.h Fri Feb 13 01:40:03 2015
@@ -30,6 +30,19 @@ public:
   virtual std::unique_ptr<PDBSymbolExe> getGlobalScope() const = 0;
   virtual std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const = 0;
 
+  template <typename T>
+  std::unique_ptr<T> getConcreteSymbolById(uint32_t SymbolId) const {
+    auto Symbol(getSymbolById(SymbolId));
+    if (!Symbol)
+      return nullptr;
+
+    T *ConcreteSymbol = dyn_cast<T>(Symbol.get());
+    if (!ConcreteSymbol)
+      return nullptr;
+    Symbol.release();
+    return std::unique_ptr<T>(ConcreteSymbol);
+  }
+
   virtual std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const = 0;
   virtual std::unique_ptr<IPDBEnumSourceFiles>
   getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const = 0;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBExtras.h?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBExtras.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBExtras.h Fri Feb 13 01:40:03 2015
@@ -26,6 +26,7 @@ struct stream_indent {
 raw_ostream &operator<<(raw_ostream &OS, const stream_indent &Indent);
 
 raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
+raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_RegisterId &Reg);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
@@ -33,6 +34,7 @@ raw_ostream &operator<<(raw_ostream &OS,
 raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
+raw_ostream &operator<<(raw_ostream &OS, const PDB_BuiltinType &Type);
 raw_ostream &operator<<(raw_ostream &OS, const PDB_UniqueId &Id);
 
 raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h Fri Feb 13 01:40:03 2015
@@ -11,7 +11,6 @@
 #define LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H
 
 #include "PDBSymbol.h"
-#include "PDBTypes.h"
 
 namespace llvm {
 

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp Fri Feb 13 01:40:03 2015
@@ -190,7 +190,7 @@ void DIARawSymbol::dump(raw_ostream &OS,
   RAW_METHOD_DUMP(OS, get_baseDataOffset)
   RAW_METHOD_DUMP(OS, get_baseDataSlot)
   RAW_METHOD_DUMP(OS, get_baseSymbolId)
-  RAW_METHOD_DUMP(OS, get_builtInKind)
+  RAW_METHOD_DUMP(OS, get_baseType)
   RAW_METHOD_DUMP(OS, get_bitPosition)
   RAW_METHOD_DUMP(OS, get_callingConvention)
   RAW_METHOD_DUMP(OS, get_classParentId)
@@ -457,8 +457,8 @@ uint32_t DIARawSymbol::getBaseSymbolId()
 }
 
 PDB_BuiltinType DIARawSymbol::getBuiltinType() const {
-  return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(
-      Symbol, &IDiaSymbol::get_builtInKind);
+  return PrivateGetDIAValue<DWORD, PDB_BuiltinType>(Symbol,
+                                                    &IDiaSymbol::get_baseType);
 }
 
 uint32_t DIARawSymbol::getBitPosition() const {

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBExtras.cpp Fri Feb 13 01:40:03 2015
@@ -44,6 +44,41 @@ raw_ostream &llvm::operator<<(raw_ostrea
   return OS;
 }
 
+raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_CallingConv &Conv) {
+  OS << "__";
+  switch (Conv) {
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearCdecl, "cdecl", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarCdecl, "cdecl", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearPascal, "pascal", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarPascal, "pascal", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearFastcall, "fastcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarFastcall, "fastcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Skipped, "skippedcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearStdcall, "stdcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarStdcall, "stdcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearSyscall, "syscall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, FarSyscall, "syscall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Thiscall, "thiscall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, MipsCall, "mipscall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Generic, "genericcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Alphacall, "alphacall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Ppccall, "ppccall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, SuperHCall, "superhcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Armcall, "armcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, AM33call, "am33call", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Tricall, "tricall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Sh5call, "sh5call", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, M32R, "m32rcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Clrcall, "clrcall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, Inline, "inlinecall", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearVectorcall, "vectorcall",
+                               OS)
+  default:
+    OS << "unknowncall";
+  }
+  return OS;
+}
+
 raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_DataKind &Data) {
   switch (Data) {
     CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Unknown, "unknown", OS)
@@ -215,6 +250,31 @@ raw_ostream &llvm::operator<<(raw_ostrea
   }
   return OS;
 }
+
+raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_BuiltinType &Type) {
+  switch (Type) {
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Void, "void", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Char, "char", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, WCharT, "wchar_t", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Int, "int", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, UInt, "uint", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Float, "float", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, BCD, "BCD", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Bool, "bool", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Long, "long", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, ULong, "ulong", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Currency, "CURRENCY", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Date, "DATE", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Variant, "VARIANT", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Complex, "complex", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, Bitfield, "bitfield", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, BSTR, "BSTR", OS)
+    CASE_OUTPUT_ENUM_CLASS_STR(PDB_BuiltinType, HResult, "HRESULT", OS)
+  default:
+    break;
+  }
+  return OS;
+}
 
 raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UniqueId &Id) {
   static const char *Lookup = "0123456789ABCDEF";

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp Fri Feb 13 01:40:03 2015
@@ -29,70 +29,75 @@ PDBSymbolCompiland::PDBSymbolCompiland(c
 
 void PDBSymbolCompiland::dump(raw_ostream &OS, int Indent,
                               PDB_DumpLevel Level) const {
-  std::string FullName = getName();
-  StringRef Name = llvm::sys::path::filename(StringRef(FullName.c_str()));
-
-  OS.indent(Indent);
-  OS << "Compiland: " << Name << "\n";
-
-  std::string Source = getSourceFileName();
-  std::string Library = getLibraryName();
-  if (!Source.empty())
-    OS << stream_indent(Indent + 2) << "Source: " << this->getSourceFileName()
-       << "\n";
-  if (!Library.empty())
-    OS << stream_indent(Indent + 2) << "Library: " << this->getLibraryName()
-       << "\n";
-
-  TagStats Stats;
-  auto ChildrenEnum = getChildStats(Stats);
-  OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n";
-  if (Level >= PDB_DumpLevel::Normal) {
-    while (auto Child = ChildrenEnum->getNext()) {
-      if (llvm::isa<PDBSymbolCompilandDetails>(*Child))
-        continue;
-      if (llvm::isa<PDBSymbolCompilandEnv>(*Child))
-        continue;
-      Child->dump(OS, Indent + 4, PDB_DumpLevel::Compact);
+  if (Level == PDB_DumpLevel::Detailed) {
+    std::string FullName = getName();
+    StringRef Name = llvm::sys::path::filename(StringRef(FullName.c_str()));
+
+    OS.indent(Indent);
+    OS << "Compiland: " << Name << "\n";
+
+    std::string Source = getSourceFileName();
+    std::string Library = getLibraryName();
+    if (!Source.empty())
+      OS << stream_indent(Indent + 2) << "Source: " << this->getSourceFileName()
+         << "\n";
+    if (!Library.empty())
+      OS << stream_indent(Indent + 2) << "Library: " << this->getLibraryName()
+         << "\n";
+
+    TagStats Stats;
+    auto ChildrenEnum = getChildStats(Stats);
+    OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n";
+    if (Level >= PDB_DumpLevel::Detailed) {
+      while (auto Child = ChildrenEnum->getNext()) {
+        if (llvm::isa<PDBSymbolCompilandDetails>(*Child))
+          continue;
+        if (llvm::isa<PDBSymbolCompilandEnv>(*Child))
+          continue;
+        PDB_DumpLevel ChildLevel = (Level == PDB_DumpLevel::Detailed)
+                                       ? PDB_DumpLevel::Normal
+                                       : PDB_DumpLevel::Compact;
+        Child->dump(OS, Indent + 4, ChildLevel);
+        OS << "\n";
+      }
     }
-  }
 
-  auto DetailsEnum(findAllChildren<PDBSymbolCompilandDetails>());
-  if (auto CD = DetailsEnum->getNext()) {
-    VersionInfo FE;
-    VersionInfo BE;
-    CD->getFrontEndVersion(FE);
-    CD->getBackEndVersion(BE);
-    OS << stream_indent(Indent + 2) << "Compiler: " << CD->getCompilerName()
-       << "\n";
-    OS << stream_indent(Indent + 2) << "Version: " << FE << ", " << BE << "\n";
-
-    OS << stream_indent(Indent + 2) << "Lang: " << CD->getLanguage() << "\n";
-    OS << stream_indent(Indent + 2) << "Attributes: ";
-    if (CD->hasDebugInfo())
-      OS << "DebugInfo ";
-    if (CD->isDataAligned())
-      OS << "DataAligned ";
-    if (CD->isLTCG())
-      OS << "LTCG ";
-    if (CD->hasSecurityChecks())
-      OS << "SecurityChecks ";
-    if (CD->isHotpatchable())
-      OS << "HotPatchable";
+    auto DetailsEnum(findAllChildren<PDBSymbolCompilandDetails>());
+    if (auto CD = DetailsEnum->getNext()) {
+      VersionInfo FE;
+      VersionInfo BE;
+      CD->getFrontEndVersion(FE);
+      CD->getBackEndVersion(BE);
+      OS << stream_indent(Indent + 2) << "Compiler: " << CD->getCompilerName()
+         << "\n";
+      OS << stream_indent(Indent + 2) << "Version: " << FE << ", " << BE
+         << "\n";
+
+      OS << stream_indent(Indent + 2) << "Lang: " << CD->getLanguage() << "\n";
+      OS << stream_indent(Indent + 2) << "Attributes: ";
+      if (CD->hasDebugInfo())
+        OS << "DebugInfo ";
+      if (CD->isDataAligned())
+        OS << "DataAligned ";
+      if (CD->isLTCG())
+        OS << "LTCG ";
+      if (CD->hasSecurityChecks())
+        OS << "SecurityChecks ";
+      if (CD->isHotpatchable())
+        OS << "HotPatchable";
 
-    OS << "\n";
-    auto Files(Session.getSourceFilesForCompiland(*this));
-    if (Level >= PDB_DumpLevel::Detailed) {
-      OS << stream_indent(Indent + 2) << Files->getChildCount()
-         << " source files:\n";
-      while (auto File = Files->getNext())
-        File->dump(OS, Indent + 4, PDB_DumpLevel::Compact);
-    } else {
+      auto Files(Session.getSourceFilesForCompiland(*this));
+      OS << "\n";
       OS << stream_indent(Indent + 2) << Files->getChildCount()
-         << " source files\n";
+         << " source files";
+    }
+    uint32_t Count = DetailsEnum->getChildCount();
+    if (Count > 1) {
+      OS << "\n";
+      OS << stream_indent(Indent + 2) << "(" << Count - 1 << " more omitted)";
     }
+  } else {
+    std::string FullName = getName();
+    OS << stream_indent(Indent) << "Compiland: " << FullName;
   }
-  uint32_t Count = DetailsEnum->getChildCount();
-  if (Count > 1)
-    OS << stream_indent(Indent + 2) << "(" << Count - 1 << " more omitted)\n";
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp Fri Feb 13 01:40:03 2015
@@ -26,7 +26,7 @@ void PDBSymbolData::dump(raw_ostream &OS
   OS << stream_indent(Indent);
   PDB_LocType Loc = getLocationType();
   PDB_DataKind Kind = getDataKind();
-  if (Level == PDB_DumpLevel::Compact) {
+  if (Level >= PDB_DumpLevel::Normal) {
     switch (Loc) {
     case PDB_LocType::Static: {
       uint32_t RVA = getRelativeVirtualAddress();
@@ -75,6 +75,7 @@ void PDBSymbolData::dump(raw_ostream &OS
       OS << "???";
     }
   }
+
   OS << "] ";
   if (Kind == PDB_DataKind::Member || Kind == PDB_DataKind::StaticMember) {
     uint32_t ClassId = getClassParentId();
@@ -86,6 +87,5 @@ void PDBSymbolData::dump(raw_ostream &OS
       OS << "::";
     }
   }
-  OS << getName() << "\n";
-  OS.flush();
+  OS << getName();
 }
\ No newline at end of file

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp Fri Feb 13 01:40:03 2015
@@ -27,17 +27,17 @@ void PDBSymbolExe::dump(raw_ostream &OS,
                         PDB_DumpLevel Level) const {
   std::string FileName(getSymbolsFileName());
 
-  OS << "Summary for " << FileName << "\n";
+  OS << stream_indent(Indent) << "Summary for " << FileName << "\n";
 
   uint64_t FileSize = 0;
   if (!llvm::sys::fs::file_size(FileName, FileSize))
-    OS << "  Size: " << FileSize << " bytes\n";
+    OS << stream_indent(Indent + 2) << "Size: " << FileSize << " bytes\n";
   else
-    OS << "  Size: (Unable to obtain file size)\n";
+    OS << stream_indent(Indent + 2) << "Size: (Unable to obtain file size)\n";
   PDB_UniqueId Guid = getGuid();
-  OS << "  Guid: " << Guid << "\n";
-  OS << "  Age: " << getAge() << "\n";
-  OS << "  Attributes: ";
+  OS << stream_indent(Indent + 2) << "Guid: " << Guid << "\n";
+  OS << stream_indent(Indent + 2) << "Age: " << getAge() << "\n";
+  OS << stream_indent(Indent + 2) << "Attributes: ";
   if (hasCTypes())
     OS << "HasCTypes ";
   if (hasPrivateSymbols())
@@ -48,6 +48,7 @@ void PDBSymbolExe::dump(raw_ostream &OS,
   auto ChildrenEnum = getChildStats(Stats);
   OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n";
   while (auto Child = ChildrenEnum->getNext()) {
-    Child->dump(OS, Indent+2, PDB_DumpLevel::Compact);
+    Child->dump(OS, Indent + 4, PDB_DumpLevel::Normal);
+    OS << "\n";
   }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp Fri Feb 13 01:40:03 2015
@@ -15,6 +15,7 @@
 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
 
 #include "llvm/Support/Format.h"
@@ -26,9 +27,8 @@ PDBSymbolFunc::PDBSymbolFunc(const IPDBS
 
 void PDBSymbolFunc::dump(raw_ostream &OS, int Indent,
                          PDB_DumpLevel Level) const {
-  if (Level == PDB_DumpLevel::Compact) {
-    OS << stream_indent(Indent);
-
+  OS << stream_indent(Indent);
+  if (Level >= PDB_DumpLevel::Normal) {
     uint32_t FuncStart = getRelativeVirtualAddress();
     uint32_t FuncEnd = FuncStart + getLength();
     if (FuncStart == 0 && FuncEnd == 0) {
@@ -53,6 +53,12 @@ void PDBSymbolFunc::dump(raw_ostream &OS
       OS << "(FPO)";
 
     OS << " ";
+    uint32_t FuncSigId = getTypeId();
+    if (auto FuncSig = Session.getConcreteSymbolById<PDBSymbolTypeFunctionSig>(
+            FuncSigId)) {
+      OS << "(" << FuncSig->getCallingConvention() << ") ";
+    }
+
     uint32_t ClassId = getClassParentId();
     if (ClassId != 0) {
       if (auto Class = Session.getSymbolById(ClassId)) {
@@ -63,6 +69,7 @@ void PDBSymbolFunc::dump(raw_ostream &OS
       }
     }
     OS << getName();
-    OS << "\n";
+  } else {
+    OS << getName();
   }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp Fri Feb 13 01:40:03 2015
@@ -12,6 +12,8 @@
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
 
+#include "llvm/Support/Format.h"
+
 using namespace llvm;
 
 PDBSymbolLabel::PDBSymbolLabel(const IPDBSession &PDBSession,
@@ -19,4 +21,8 @@ PDBSymbolLabel::PDBSymbolLabel(const IPD
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolLabel::dump(raw_ostream &OS, int Indent,
-                          PDB_DumpLevel Level) const {}
+                          PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  OS << "label [" << format_hex(getRelativeVirtualAddress(), 10) << "] "
+     << getName();
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp Fri Feb 13 01:40:03 2015
@@ -19,4 +19,7 @@ PDBSymbolPublicSymbol::PDBSymbolPublicSy
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolPublicSymbol::dump(raw_ostream &OS, int Indent,
-                                 PDB_DumpLevel Level) const {}
+                                 PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  OS << "public symbol: " << getName();
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp Fri Feb 13 01:40:03 2015
@@ -22,23 +22,21 @@ PDBSymbolThunk::PDBSymbolThunk(const IPD
 
 void PDBSymbolThunk::dump(raw_ostream &OS, int Indent,
                           PDB_DumpLevel Level) const {
-  if (Level == PDB_DumpLevel::Compact) {
-    OS.indent(Indent);
-    PDB_ThunkOrdinal Ordinal = getThunkOrdinal();
-    uint32_t RVA = getRelativeVirtualAddress();
-    if (Ordinal == PDB_ThunkOrdinal::TrampIncremental) {
-      OS << format_hex(RVA, 10);
-    } else {
-      OS << "[" << format_hex(RVA, 10);
-      OS << " - " << format_hex(RVA + getLength(), 10) << "]";
-    }
-    OS << " thunk(" << Ordinal << ")";
-    if (Ordinal == PDB_ThunkOrdinal::TrampIncremental)
-      OS << " -> " << format_hex(getTargetRelativeVirtualAddress(), 10);
-    OS << " ";
-    std::string Name = getName();
-    if (!Name.empty())
-      OS << Name;
-    OS << "\n";
+  OS.indent(Indent);
+  OS << "thunk ";
+  PDB_ThunkOrdinal Ordinal = getThunkOrdinal();
+  uint32_t RVA = getRelativeVirtualAddress();
+  if (Ordinal == PDB_ThunkOrdinal::TrampIncremental) {
+    OS << format_hex(RVA, 10);
+  } else {
+    OS << "[" << format_hex(RVA, 10);
+    OS << " - " << format_hex(RVA + getLength(), 10) << "]";
   }
+  OS << " (" << Ordinal << ")";
+  if (Ordinal == PDB_ThunkOrdinal::TrampIncremental)
+    OS << " -> " << format_hex(getTargetRelativeVirtualAddress(), 10);
+  OS << " ";
+  std::string Name = getName();
+  if (!Name.empty())
+    OS << Name;
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp Fri Feb 13 01:40:03 2015
@@ -9,6 +9,7 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h"
 
@@ -19,4 +20,11 @@ PDBSymbolTypeArray::PDBSymbolTypeArray(c
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeArray::dump(raw_ostream &OS, int Indent,
-                              PDB_DumpLevel Level) const {}
+                              PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  if (auto ElementType = Session.getSymbolById(getTypeId()))
+    ElementType->dump(OS, 0, PDB_DumpLevel::Compact);
+  else
+    OS << "<unknown-element-type>";
+  OS << "[" << getLength() << "]";
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp Fri Feb 13 01:40:03 2015
@@ -19,4 +19,7 @@ PDBSymbolTypeBaseClass::PDBSymbolTypeBas
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeBaseClass::dump(raw_ostream &OS, int Indent,
-                                  PDB_DumpLevel Level) const {}
+                                  PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  OS << "<base class> " << getName();
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp Fri Feb 13 01:40:03 2015
@@ -19,4 +19,10 @@ PDBSymbolTypeBuiltin::PDBSymbolTypeBuilt
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeBuiltin::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {}
+                                PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  PDB_BuiltinType Type = getBuiltinType();
+  OS << Type;
+  if (Type == PDB_BuiltinType::UInt || Type == PDB_BuiltinType::Int)
+    OS << (8 * getLength()) << "_t";
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp Fri Feb 13 01:40:03 2015
@@ -9,6 +9,7 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
 
@@ -19,4 +20,17 @@ PDBSymbolTypeEnum::PDBSymbolTypeEnum(con
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeEnum::dump(raw_ostream &OS, int Indent,
-                             PDB_DumpLevel Level) const {}
+                             PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  if (Level >= PDB_DumpLevel::Normal)
+    OS << "enum ";
+
+  uint32_t ClassId = getClassParentId();
+  if (ClassId != 0) {
+    if (auto ClassParent = Session.getSymbolById(ClassId)) {
+      ClassParent->dump(OS, 0, Level);
+      OS << "::";
+    }
+  }
+  OS << getName();
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp Fri Feb 13 01:40:03 2015
@@ -9,6 +9,7 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
 
@@ -19,4 +20,10 @@ PDBSymbolTypeFunctionArg::PDBSymbolTypeF
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeFunctionArg::dump(raw_ostream &OS, int Indent,
-                                    PDB_DumpLevel Level) const {}
+                                    PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  uint32_t TypeId = getTypeId();
+  if (auto Type = Session.getSymbolById(TypeId)) {
+    Type->dump(OS, 0, Level);
+  }
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp Fri Feb 13 01:40:03 2015
@@ -9,7 +9,11 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
+#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
 
 using namespace llvm;
@@ -19,4 +23,36 @@ PDBSymbolTypeFunctionSig::PDBSymbolTypeF
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeFunctionSig::dump(raw_ostream &OS, int Indent,
-                                    PDB_DumpLevel Level) const {}
+                                    PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+
+  uint32_t ReturnTypeId = getTypeId();
+  if (auto ReturnType = Session.getSymbolById(ReturnTypeId)) {
+    ReturnType->dump(OS, 0, PDB_DumpLevel::Compact);
+    OS << " ";
+  }
+  // TODO: We need a way to detect if this is a pointer to function so that we
+  // can print the * between the return type and the argument list.  The only
+  // way to do this is to pass the parent into this function, but that will
+  // require a larger interface change.
+  OS << getCallingConvention() << " ";
+  uint32_t ClassId = getClassParentId();
+  if (ClassId != 0) {
+    if (auto ClassParent = Session.getSymbolById(ClassId)) {
+      OS << "(";
+      ClassParent->dump(OS, 0, PDB_DumpLevel::Compact);
+      OS << "::*)";
+    }
+  }
+  OS.flush();
+  OS << "(";
+  if (auto ChildEnum = findAllChildren<PDBSymbolTypeFunctionArg>()) {
+    uint32_t Index = 0;
+    while (auto Arg = ChildEnum->getNext()) {
+      Arg->dump(OS, 0, PDB_DumpLevel::Compact);
+      if (++Index < ChildEnum->getChildCount())
+        OS << ", ";
+    }
+  }
+  OS << ")";
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp Fri Feb 13 01:40:03 2015
@@ -10,6 +10,7 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
 
@@ -20,4 +21,14 @@ PDBSymbolTypePointer::PDBSymbolTypePoint
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypePointer::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {}
+                                PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  if (isConstType())
+    OS << "const ";
+  if (isVolatileType())
+    OS << "volatile ";
+  uint32_t PointeeId = getTypeId();
+  if (auto PointeeType = Session.getSymbolById(PointeeId))
+    PointeeType->dump(OS, 0, PDB_DumpLevel::Compact);
+  OS << ((isReference()) ? "&" : "*");
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp Fri Feb 13 01:40:03 2015
@@ -23,11 +23,16 @@ PDBSymbolTypeTypedef::PDBSymbolTypeTyped
 void PDBSymbolTypeTypedef::dump(raw_ostream &OS, int Indent,
                                 PDB_DumpLevel Level) const {
   OS.indent(Indent);
-  OS << "typedef:" << getName() << " -> ";
-  std::string TargetTypeName;
-  auto TypeSymbol = Session.getSymbolById(getTypeId());
-  if (PDBSymbolTypeUDT *UDT = dyn_cast<PDBSymbolTypeUDT>(TypeSymbol.get())) {
-    TargetTypeName = UDT->getName();
+  if (Level >= PDB_DumpLevel::Normal) {
+    std::string Name = getName();
+    OS << "typedef:" << Name << " -> ";
+    std::string TargetTypeName;
+    uint32_t TargetId = getTypeId();
+    if (auto TypeSymbol = Session.getSymbolById(TargetId)) {
+      TypeSymbol->dump(OS, 0, PDB_DumpLevel::Compact);
+    }
+    OS << TargetTypeName;
+  } else {
+    OS << getName();
   }
-  OS << TargetTypeName << "\n";
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp Fri Feb 13 01:40:03 2015
@@ -9,6 +9,7 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
 
@@ -19,4 +20,22 @@ PDBSymbolTypeUDT::PDBSymbolTypeUDT(const
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeUDT::dump(raw_ostream &OS, int Indent,
-                            PDB_DumpLevel Level) const {}
+                            PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  if (Level >= PDB_DumpLevel::Normal)
+    OS << "class ";
+
+  if (isNested()) {
+    uint32_t ClassId = getClassParentId();
+    if (ClassId != 0) {
+      if (auto ClassParent = Session.getSymbolById(ClassId)) {
+        ClassParent->dump(OS, 0, Level);
+        OS << "::";
+      }
+    }
+  }
+  OS << getName();
+
+  if (Level >= PDB_DumpLevel::Normal)
+    OS << " (" << getLength() << " bytes)";
+}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp Fri Feb 13 01:40:03 2015
@@ -9,8 +9,11 @@
 
 #include <utility>
 
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
 #include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h"
 
 using namespace llvm;
 
@@ -19,4 +22,20 @@ PDBSymbolTypeVTable::PDBSymbolTypeVTable
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeVTable::dump(raw_ostream &OS, int Indent,
-                               PDB_DumpLevel Level) const {}
+                               PDB_DumpLevel Level) const {
+  OS << stream_indent(Indent);
+  uint32_t ClassId = getClassParentId();
+  if (auto ClassParent = Session.getSymbolById(ClassId)) {
+    ClassParent->dump(OS, 0, PDB_DumpLevel::Compact);
+    OS << "::";
+  }
+  OS << "<vtbl> ";
+  if (auto VtblPointer =
+          Session.getConcreteSymbolById<PDBSymbolTypePointer>(getTypeId())) {
+    if (auto VtblShape =
+            Session.getConcreteSymbolById<PDBSymbolTypeVTableShape>(
+                VtblPointer->getTypeId()))
+      OS << "(" << VtblShape->getCount() << " entries)";
+  }
+  OS.flush();
+}

Modified: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp?rev=229076&r1=229075&r2=229076&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp Fri Feb 13 01:40:03 2015
@@ -65,7 +65,8 @@ static void dumpInput(StringRef Path) {
   if (opts::Compilands) {
     auto Compilands = GlobalScope->findAllChildren<PDBSymbolCompiland>();
     while (auto Compiland = Compilands->getNext()) {
-      Compiland->dump(outs(), 0, PDB_DumpLevel::Normal);
+      Compiland->dump(outs(), 0, PDB_DumpLevel::Detailed);
+      outs() << "\n";
     }
   }
   outs().flush();





More information about the llvm-commits mailing list