From a952c49c2047c2506d7b313cbeff82843c775f7e Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 13 Feb 2015 07:40:03 +0000 Subject: 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. llvm-svn: 229076 --- llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp | 34 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp') diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp index eac1a544d33..dc24507b1d1 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp @@ -22,23 +22,21 @@ PDBSymbolThunk::PDBSymbolThunk(const IPDBSession &PDBSession, 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; } -- cgit v1.2.3