[Lldb-commits] [PATCH] D51176: Restrict the set of plugins used for ProcessMinidump
Leonard Mosescu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 23 11:17:19 PDT 2018
lemo added a comment.
> Dynamic loaders are needed for loading breakpad minidumps that are for MacOSX and iOS processes. They should also be needed for loading any minidumps that have stack traces.
Thanks. I just validated the change against a macOS minidump and everything works fine in my local test. What parts of the dynamic loader is relevant to minidump loading? (ie. anything specific I should pay attention to?)
> No dynamic loader plug-ins should be affecting the module list during the plug-in loading/selection, if that is happening, that is a bug and it should be fixed.
I agree. Although that's outside the scope of this change if I'm right in that we can avoid the dynamic loader plugins completely. Here's an example where the DynamicLoaderDarwin is misbehaving
(note the DynamicLoaderDarwin::PrivateInitialize() call to Target::ClearAllLoadedSections())
lldb_private::SectionLoadList::Clear(lldb_private::SectionLoadList * this) (lldb/source/Target/SectionLoadList.cpp:47)
lldb_private::SectionLoadList::~SectionLoadList(lldb_private::SectionLoadList * this) (lldb/include/lldb/Target/SectionLoadList.h:39)
std::_Sp_counted_ptr<lldb_private::SectionLoadList*, (__gnu_cxx::_Lock_policy)2>::_M_dispose(std::_Sp_counted_ptr<lldb_private::SectionLoadList*, __gnu_cxx::_S_atomic> * this) (libstdcxx/include/bits/shared_ptr_base.h:371)
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(std::_Sp_counted_base<__gnu_cxx::_S_atomic> * this) (libstdcxx/include/bits/shared_ptr_base.h:149)
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(std::__shared_count<__gnu_cxx::_S_atomic> * this) (libstdcxx/include/bits/shared_ptr_base.h:664)
std::__shared_ptr<lldb_private::SectionLoadList, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr(std::__shared_ptr<lldb_private::SectionLoadList, __gnu_cxx::_S_atomic> * this) (libstdcxx/include/bits/shared_ptr_base.h:912)
std::shared_ptr<lldb_private::SectionLoadList>::~shared_ptr(std::shared_ptr<lldb_private::SectionLoadList> * this) (libstdcxx/include/bits/shared_ptr_base.h:342)
std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >::~pair(std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > * this) (libstdcxx/include/bits/stl_pair.h:96)
__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::destroy<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >(__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > * this, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > * __p) (libstdcxx/include/ext/new_allocator.h:165)
std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > >::destroy<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >(std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > >::allocator_type & __a, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > * __p) (libstdcxx/include/bits/alloc_traits.h:539)
std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_M_destroy_node(std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > * this, std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_Link_type __p) (libstdcxx/include/bits/stl_tree.h:435)
std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_M_erase(std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > * this, std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_Link_type __x) (libstdcxx/include/bits/stl_tree.h:1283)
std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::clear(std::_Rb_tree<unsigned int, std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> >, std::_Select1st<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > >, std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::_ConstCompare<std::less<unsigned int> >, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > * this) (libstdcxx/include/bits/stl_tree.h:944)
std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > >::clear(std::map<unsigned int, std::shared_ptr<lldb_private::SectionLoadList>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::shared_ptr<lldb_private::SectionLoadList> > > > * this) (libstdcxx/include/bits/stl_map.h:862)
lldb_private::SectionLoadHistory::Clear(lldb_private::SectionLoadHistory * this) (lldb/source/Target/SectionLoadHistory.cpp:29)
lldb_private::Target::ClearAllLoadedSections(lldb_private::Target * this) (lldb/source/Target/Target.cpp:2952)
lldb_private::DynamicLoaderDarwin::PrivateInitialize(lldb_private::DynamicLoaderDarwin * this, lldb_private::Process * process) (lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp:768)
lldb_private::DynamicLoaderDarwin::DidAttach(lldb_private::DynamicLoaderDarwin * this) (lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp:73)
lldb_private::Process::LoadCore(lldb_private::Process * this) (lldb/source/Target/Process.cpp:2847)
lldb::SBTarget::LoadCore(lldb::SBTarget * this, const char * core_file, lldb::SBError & error) (lldb/source/API/SBTarget.cpp:218)
Repository:
rLLDB LLDB
https://reviews.llvm.org/D51176
More information about the lldb-commits
mailing list