diff options
author | Zachary Turner <zturner@google.com> | 2015-05-01 20:24:26 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-05-01 20:24:26 +0000 |
commit | e5cb269352c6534dd79d70e44e71211736f603eb (patch) | |
tree | 1527fa91f3548e159f506fe1f7ba465b865fb434 /llvm/tools/llvm-pdbdump/FunctionDumper.cpp | |
parent | e6892c8149dcddf34f3f704d2ba0a712fb5ac89a (diff) | |
download | bcm5719-llvm-e5cb269352c6534dd79d70e44e71211736f603eb.tar.gz bcm5719-llvm-e5cb269352c6534dd79d70e44e71211736f603eb.zip |
[llvm-pdbdump] Support dynamic load address and external symbols.
This patch adds the --load-address command line option to
llvm-pdbdump, which dumps all addresses assuming the module has
loaded at the specified address.
Additionally, this patch adds an option to llvm-pdbdump to support
dumping of public symbols (i.e. symbols with external linkage).
llvm-svn: 236342
Diffstat (limited to 'llvm/tools/llvm-pdbdump/FunctionDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbdump/FunctionDumper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp index 419f888ef2f..9584812e81a 100644 --- a/llvm/tools/llvm-pdbdump/FunctionDumper.cpp +++ b/llvm/tools/llvm-pdbdump/FunctionDumper.cpp @@ -109,19 +109,19 @@ void FunctionDumper::start(const PDBSymbolTypeFunctionSig &Symbol, } void FunctionDumper::start(const PDBSymbolFunc &Symbol, PointerType Pointer) { - uint32_t FuncStart = Symbol.getRelativeVirtualAddress(); - uint32_t FuncEnd = FuncStart + Symbol.getLength(); + uint64_t FuncStart = Symbol.getVirtualAddress(); + uint64_t FuncEnd = FuncStart + Symbol.getLength(); Printer << "func ["; WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncStart, 10); if (auto DebugStart = Symbol.findOneChild<PDBSymbolFuncDebugStart>()) { - uint32_t Prologue = DebugStart->getRelativeVirtualAddress() - FuncStart; + uint64_t Prologue = DebugStart->getVirtualAddress() - FuncStart; WithColor(Printer, PDB_ColorItem::Offset).get() << "+" << Prologue; } Printer << " - "; WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncEnd, 10); if (auto DebugEnd = Symbol.findOneChild<PDBSymbolFuncDebugEnd>()) { - uint32_t Epilogue = FuncEnd - DebugEnd->getRelativeVirtualAddress(); + uint64_t Epilogue = FuncEnd - DebugEnd->getVirtualAddress(); WithColor(Printer, PDB_ColorItem::Offset).get() << "-" << Epilogue; } Printer << "] ("; |