diff options
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index d6f29a6b49e..5507428c53e 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -710,24 +710,21 @@ ModuleList::GetSharedModule for (uint32_t module_idx = 0; module_idx < num_matching_modules; ++module_idx) { module_sp = matching_module_list.GetModuleAtIndex(module_idx); - // If we had a UUID and we found a match, then that is good enough for a match - if (uuid_ptr) - break; - if (module_file_spec) + + // Make sure the file for the module hasn't been modified + if (module_sp->FileHasChanged()) { - // If we didn't have a UUID in mind when looking for the object file, - // then we should make sure the modification time hasn't changed! - TimeValue file_spec_mod_time(module_file_spec.GetModificationTime()); - if (file_spec_mod_time.IsValid()) - { - if (file_spec_mod_time == module_sp->GetModificationTime()) - return error; - } + if (old_module_sp_ptr && !old_module_sp_ptr->get()) + *old_module_sp_ptr = module_sp; + shared_module_list.Remove (module_sp); + module_sp.reset(); + } + else + { + // The module matches and the module was not modified from + // when it was last loaded. + return error; } - if (old_module_sp_ptr && !old_module_sp_ptr->get()) - *old_module_sp_ptr = module_sp; - shared_module_list.Remove (module_sp); - module_sp.reset(); } } } |