You've already forked llvm-project
mirror of
https://github.com/AdaCore/llvm-project.git
synced 2026-02-12 13:52:35 -08:00
Use the locking iterator to ensure module don't change during iteration.
This commit is contained in:
@@ -1511,8 +1511,7 @@ bool Target::IgnoreWatchpointByID(lldb::watch_id_t watch_id,
|
||||
|
||||
ModuleSP Target::GetExecutableModule() {
|
||||
// search for the first executable in the module list
|
||||
for (size_t i = 0; i < m_images.GetSize(); ++i) {
|
||||
ModuleSP module_sp = m_images.GetModuleAtIndex(i);
|
||||
for (ModuleSP module_sp : m_images.Modules()) {
|
||||
lldb_private::ObjectFile *obj = module_sp->GetObjectFile();
|
||||
if (obj == nullptr)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user