diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-08 17:34:50 +0000 |
commit | 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e (patch) | |
tree | 62f873df87c7c675557a179e0c4c83fe9f3087bc /contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp | |
parent | cf037972ea8863e2bab7461d77345367d2c1e054 (diff) | |
parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) |
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp b/contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp index c62a67fa29f9..a3b91fc37dac 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp @@ -27,10 +27,10 @@ using namespace llvm::codeview; LLDB_PLUGIN_DEFINE(ObjectFilePDB) -static UUID GetPDBUUID(InfoStream &IS) { +static UUID GetPDBUUID(InfoStream &IS, DbiStream &DS) { UUID::CvRecordPdb70 debug_info; memcpy(&debug_info.Uuid, IS.getGuid().Guid, sizeof(debug_info.Uuid)); - debug_info.Age = IS.getAge(); + debug_info.Age = DS.getAge(); return UUID(debug_info); } @@ -82,7 +82,12 @@ bool ObjectFilePDB::initPDBFile() { llvm::consumeError(info_stream.takeError()); return false; } - m_uuid = GetPDBUUID(*info_stream); + auto dbi_stream = m_file_up->getPDBDbiStream(); + if (!dbi_stream) { + llvm::consumeError(dbi_stream.takeError()); + return false; + } + m_uuid = GetPDBUUID(*info_stream, *dbi_stream); return true; } @@ -126,7 +131,7 @@ size_t ObjectFilePDB::GetModuleSpecifications( } lldb_private::UUID &uuid = module_spec.GetUUID(); - uuid = GetPDBUUID(*info_stream); + uuid = GetPDBUUID(*info_stream, *dbi_stream); ArchSpec &module_arch = module_spec.GetArchitecture(); switch (dbi_stream->getMachineType()) { |