diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index b9b075d83b6a..8af90cb66e87 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -240,12 +240,7 @@ void SymbolFileNativePDB::Terminate() { void SymbolFileNativePDB::DebuggerInitialize(Debugger &debugger) {} -ConstString SymbolFileNativePDB::GetPluginNameStatic() { - static ConstString g_name("native-pdb"); - return g_name; -} - -const char *SymbolFileNativePDB::GetPluginDescriptionStatic() { +llvm::StringRef SymbolFileNativePDB::GetPluginDescriptionStatic() { return "Microsoft PDB debug symbol cross-platform file reader."; } @@ -950,11 +945,11 @@ uint32_t SymbolFileNativePDB::ResolveSymbolContext( llvm::Optional<uint16_t> modi = m_index->GetModuleIndexForVa(file_addr); if (!modi) return 0; - CompilandIndexItem *cci = m_index->compilands().GetCompiland(*modi); - if (!cci) + CompUnitSP cu_sp = GetCompileUnitAtIndex(modi.getValue()); + if (!cu_sp) return 0; - sc.comp_unit = GetOrCreateCompileUnit(*cci).get(); + sc.comp_unit = cu_sp.get(); resolved_flags |= eSymbolContextCompUnit; } @@ -1567,9 +1562,8 @@ SymbolFileNativePDB::GetTypeSystemForLanguage(lldb::LanguageType language) { return type_system_or_err; } -ConstString SymbolFileNativePDB::GetPluginName() { - static ConstString g_name("pdb"); - return g_name; +uint64_t SymbolFileNativePDB::GetDebugInfoSize() { + // PDB files are a separate file that contains all debug info. + return m_index->pdb().getFileSize(); } -uint32_t SymbolFileNativePDB::GetPluginVersion() { return 1; } |
