From 7797c726b9a864372553de4b640c540b1dae8251 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 2 Mar 2015 04:39:56 +0000 Subject: [llvm-pdbdump] Many minor fixes and improvements A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. llvm-svn: 230933 --- llvm/tools/llvm-pdbdump/FunctionDumper.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'llvm/tools/llvm-pdbdump/FunctionDumper.cpp') diff --git a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp index ac7ab495756..419f888ef2f 100644 --- a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp +++ b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp @@ -112,28 +112,28 @@ void FunctionDumper::start(const PDBSymbolFunc &Symbol, PointerType Pointer) { uint32_t FuncStart = Symbol.getRelativeVirtualAddress(); uint32_t FuncEnd = FuncStart + Symbol.getLength(); - Printer << "func "; - WithColor(Printer, PDB_ColorItem::Address).get() << "[" - << format_hex(FuncStart, 8); + Printer << "func ["; + WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncStart, 10); if (auto DebugStart = Symbol.findOneChild()) { uint32_t Prologue = DebugStart->getRelativeVirtualAddress() - FuncStart; WithColor(Printer, PDB_ColorItem::Offset).get() << "+" << Prologue; } - WithColor(Printer, PDB_ColorItem::Address).get() << " - " - << format_hex(FuncEnd, 8); + Printer << " - "; + WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncEnd, 10); if (auto DebugEnd = Symbol.findOneChild()) { uint32_t Epilogue = FuncEnd - DebugEnd->getRelativeVirtualAddress(); WithColor(Printer, PDB_ColorItem::Offset).get() << "-" << Epilogue; } - WithColor(Printer, PDB_ColorItem::Address).get() << "] "; + Printer << "] ("; - if (Symbol.hasFramePointer()) - WithColor(Printer, PDB_ColorItem::Address).get() - << "(" << Symbol.getLocalBasePointerRegisterId() << ")"; - else - WithColor(Printer, PDB_ColorItem::Address).get() << "(FPO)"; + if (Symbol.hasFramePointer()) { + WithColor(Printer, PDB_ColorItem::Register).get() + << Symbol.getLocalBasePointerRegisterId(); + } else { + WithColor(Printer, PDB_ColorItem::Register).get() << "FPO"; + } + Printer << ") "; - Printer << " "; if (Symbol.isVirtual() || Symbol.isPureVirtual()) WithColor(Printer, PDB_ColorItem::Keyword).get() << "virtual "; -- cgit v1.2.3