diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
commit | 0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (patch) | |
tree | c94307da318be46e5aeea1a325c1e91749506e4f /source/Symbol/SymbolVendor.cpp | |
parent | 03b99097822ca3ac69252d9afae716a584ed56c4 (diff) | |
download | src-0cac4ca3916ac24ab6139d03cbfd18db9e715bfe.tar.gz src-0cac4ca3916ac24ab6139d03cbfd18db9e715bfe.zip |
Import LLDB as of upstream SVN r216948 (git 50f7fe44)vendor/lldb/lldb-r216948
This corresponds with the branchpoint for the 3.5 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=275072
svn path=/vendor/lldb/lldb-r216948/; revision=275074; tag=vendor/lldb/lldb-r216948
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 //------------------------------------------------------------------ |