SymbolVendor: Make SectionAddressesChanged a passthrough
Summary:
This moves the implementation of the function into the SymbolFile class,
making it possible to excise the SymbolVendor passthrough functions in
follow-up patches.
Reviewers: clayborg, jingham, JDevlieghere
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D65266
llvm-svn: 367231
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 223e678..be895b6 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -31,6 +31,9 @@
std::recursive_mutex &SymbolFile::GetModuleMutex() const {
return GetObjectFile()->GetModule()->GetMutex();
}
+ObjectFile *SymbolFile::GetMainObjectFile() {
+ return m_obj_file->GetModule()->GetObjectFile();
+}
SymbolFile *SymbolFile::FindPlugin(ObjectFile *obj_file) {
std::unique_ptr<SymbolFile> best_symfile_up;
@@ -206,7 +209,7 @@
return m_symtab;
// Fetch the symtab from the main object file.
- m_symtab = m_obj_file->GetModule()->GetObjectFile()->GetSymtab();
+ m_symtab = GetMainObjectFile()->GetSymtab();
// Then add our symbols to it.
if (m_symtab)
@@ -215,6 +218,15 @@
return m_symtab;
}
+void SymbolFile::SectionFileAddressesChanged() {
+ ObjectFile *module_objfile = GetMainObjectFile();
+ ObjectFile *symfile_objfile = GetObjectFile();
+ if (symfile_objfile != module_objfile)
+ symfile_objfile->SectionFileAddressesChanged();
+ if (m_symtab)
+ m_symtab->SectionFileAddressesChanged();
+}
+
void SymbolFile::Dump(Stream &s) {
s.PutCString("Types:\n");
m_type_list.Dump(&s, /*show_context*/ false);