diff options
Diffstat (limited to 'source/Symbol/SymbolVendor.cpp')
-rw-r--r-- | source/Symbol/SymbolVendor.cpp | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/source/Symbol/SymbolVendor.cpp b/source/Symbol/SymbolVendor.cpp index b51ac5a550fb..a3f4104016e5 100644 --- a/source/Symbol/SymbolVendor.cpp +++ b/source/Symbol/SymbolVendor.cpp @@ -37,7 +37,7 @@ SymbolVendor::FindPlugin (const lldb::ModuleSP &module_sp, lldb_private::Stream std::unique_ptr<SymbolVendor> instance_ap; SymbolVendorCreateInstance create_callback; - for (size_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != NULL; ++idx) + for (size_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != nullptr; ++idx) { instance_ap.reset(create_callback(module_sp, feedback_strm)); @@ -109,7 +109,7 @@ SymbolVendor::SetCompileUnitAtIndex (size_t idx, const CompUnitSP &cu_sp) // unit once, so if this assertion fails, we need to make sure that // we don't have a race condition, or have a second parse of the same // compile unit. - assert(m_compile_units[idx].get() == NULL); + assert(m_compile_units[idx].get() == nullptr); m_compile_units[idx] = cu_sp; return true; } @@ -247,7 +247,7 @@ SymbolVendor::ResolveTypeUID(lldb::user_id_t type_uid) if (m_sym_file_ap.get()) return m_sym_file_ap->ResolveTypeUID(type_uid); } - return NULL; + return nullptr; } @@ -382,7 +382,7 @@ SymbolVendor::Dump(Stream *s) { bool show_context = false; - s->Printf("%p: ", this); + s->Printf("%p: ", static_cast<void*>(this)); s->Indent(); s->PutCString("SymbolVendor"); if (m_sym_file_ap.get()) @@ -427,7 +427,7 @@ SymbolVendor::GetCompileUnitAtIndex(size_t idx) if (idx < num_compile_units) { cu_sp = m_compile_units[idx]; - if (cu_sp.get() == NULL) + if (cu_sp.get() == nullptr) { m_compile_units[idx] = m_sym_file_ap->ParseCompileUnitAtIndex(idx); cu_sp = m_compile_units[idx]; @@ -450,7 +450,7 @@ SymbolVendor::GetSymtab () return objfile->GetSymtab (); } } - return NULL; + return nullptr; } void @@ -468,6 +468,27 @@ SymbolVendor::ClearSymtab() } } +void +SymbolVendor::SectionFileAddressesChanged () +{ + ModuleSP module_sp(GetModule()); + if (module_sp) + { + ObjectFile *module_objfile = module_sp->GetObjectFile (); + if (m_sym_file_ap.get()) + { + ObjectFile *symfile_objfile = m_sym_file_ap->GetObjectFile (); + if (symfile_objfile != module_objfile) + symfile_objfile->SectionFileAddressesChanged (); + } + Symtab *symtab = GetSymtab (); + if (symtab) + { + symtab->SectionFileAddressesChanged (); + } + } +} + //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ |