diff options
| author | Zachary Turner <zturner@google.com> | 2015-02-10 22:43:25 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-02-10 22:43:25 +0000 |
| commit | a5549178f12d3d4dad72e1ab8efbb6fc9ed0d2c9 (patch) | |
| tree | 9012681968824b47f3c3f208cd91fa82cf48aa5d /llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp | |
| parent | ca19485f08fc41bb7de5be925c06735937b3ea50 (diff) | |
| download | bcm5719-llvm-a5549178f12d3d4dad72e1ab8efbb6fc9ed0d2c9.tar.gz bcm5719-llvm-a5549178f12d3d4dad72e1ab8efbb6fc9ed0d2c9.zip | |
Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.
This makes llvm-pdbdump available on all platforms, although it
will currently fail to create a dumper if there is no PDB reader
implementation for the current platform.
It implements dumping of compilands and children, which is less
information than was previously available, but it has to be
rewritten from scratch using the new set of interfaces, so the
rest of the functionality will be added back in subsequent commits.
llvm-svn: 228755
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp index f1a8936357b..a7bd96a3479 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp @@ -12,10 +12,27 @@ #include "llvm/DebugInfo/PDB/PDBSymbol.h" #include "llvm/DebugInfo/PDB/PDBSymbolThunk.h" +#include "llvm/Support/Format.h" + using namespace llvm; PDBSymbolThunk::PDBSymbolThunk(const IPDBSession &PDBSession, std::unique_ptr<IPDBRawSymbol> Symbol) : PDBSymbol(PDBSession, std::move(Symbol)) {} -void PDBSymbolThunk::dump(llvm::raw_ostream &OS) const {} +void PDBSymbolThunk::dump(raw_ostream &OS, int Indent, + PDB_DumpLevel Level) const { + if (Level == PDB_DumpLevel::Compact) { + OS.indent(Indent); + PDB_ThunkOrdinal Ordinal = getThunkOrdinal(); + OS << "THUNK[" << Ordinal << "] "; + OS << "[" << format_hex(getRelativeVirtualAddress(), 10); + if (Ordinal == PDB_ThunkOrdinal::TrampIncremental) + OS << " -> " << format_hex(getTargetRelativeVirtualAddress(), 10); + OS << "] "; + std::string Name = getName(); + if (!Name.empty()) + OS << Name; + OS << "\n"; + } +} |

