diff options
| author | Zachary Turner <zturner@google.com> | 2017-06-15 23:56:19 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-06-15 23:56:19 +0000 |
| commit | 4e950647fb56f4ed019cfb2c12ce62bbdf002cf9 (patch) | |
| tree | 399b51deb3b98a10bc1da3ffd28b7b1aa8762243 /llvm/lib/DebugInfo | |
| parent | 948a59661787f151f70ac59363729d63f92c56e3 (diff) | |
| download | bcm5719-llvm-4e950647fb56f4ed019cfb2c12ce62bbdf002cf9.tar.gz bcm5719-llvm-4e950647fb56f4ed019cfb2c12ce62bbdf002cf9.zip | |
[llvm-pdbutil] Add support for dumping lines and inlinee lines.
llvm-svn: 305529
Diffstat (limited to 'llvm/lib/DebugInfo')
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 10 |
3 files changed, 17 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp b/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp index ccd9aba45ea..928bf8c94f7 100644 --- a/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp +++ b/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp @@ -36,6 +36,13 @@ void StringsAndChecksumsRef::initializeStrings( Strings = OwnedStrings.get(); } +void StringsAndChecksumsRef::setChecksums( + const DebugChecksumsSubsectionRef &CS) { + OwnedChecksums = llvm::make_unique<DebugChecksumsSubsectionRef>(); + *OwnedChecksums = CS; + Checksums = OwnedChecksums.get(); +} + void StringsAndChecksumsRef::initializeChecksums( const DebugSubsectionRecord &FCR) { assert(FCR.kind() == DebugSubsectionKind::FileChecksums); diff --git a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp index 1ddad45df34..4186f2eb6ba 100644 --- a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp @@ -30,15 +30,6 @@ ModuleDebugStreamRef::ModuleDebugStreamRef( std::unique_ptr<MappedBlockStream> Stream) : Mod(Module), Stream(std::move(Stream)) {} -ModuleDebugStreamRef::ModuleDebugStreamRef(ModuleDebugStreamRef &&Other) - : Mod(Other.Mod), Signature(Other.Signature), - Stream(std::move(Other.Stream)), - SymbolsSubstream(std::move(Other.SymbolsSubstream)), - C11LinesSubstream(std::move(Other.C11LinesSubstream)), - C13LinesSubstream(std::move(Other.C13LinesSubstream)), - GlobalRefsSubstream(std::move(Other.GlobalRefsSubstream)), - Subsections(std::move(Other.Subsections)) {} - ModuleDebugStreamRef::~ModuleDebugStreamRef() = default; Error ModuleDebugStreamRef::reload() { diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index 1254e23c73e..a9597cdf4c4 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -363,6 +363,16 @@ Expected<PDBStringTable &> PDBFile::getStringTable() { return *Strings; } +uint32_t PDBFile::getPointerSize() { + auto DbiS = getPDBDbiStream(); + if (!DbiS) + return 0; + PDB_Machine Machine = DbiS->getMachineType(); + if (Machine == PDB_Machine::Amd64) + return 8; + return 4; +} + bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); } bool PDBFile::hasPDBGlobalsStream() { |

