summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/FunctionDumper.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-02 04:39:56 +0000
committerZachary Turner <zturner@google.com>2015-03-02 04:39:56 +0000
commit7797c726b9a864372553de4b640c540b1dae8251 (patch)
tree655a6b62386ef5b43759a072b66b3d588fea3ba1 /llvm/tools/llvm-pdbdump/FunctionDumper.cpp
parent968ceddca9a80197db8c785faf80fa9fc44ef7cd (diff)
downloadbcm5719-llvm-7797c726b9a864372553de4b640c540b1dae8251.tar.gz
bcm5719-llvm-7797c726b9a864372553de4b640c540b1dae8251.zip
[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
Diffstat (limited to 'llvm/tools/llvm-pdbdump/FunctionDumper.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/FunctionDumper.cpp24
1 files changed, 12 insertions, 12 deletions
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<PDBSymbolFuncDebugStart>()) {
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<PDBSymbolFuncDebugEnd>()) {
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 ";
OpenPOWER on IntegriCloud