[Lldb-commits] [lldb] r160072 - /lldb/trunk/source/Commands/CommandObjectTarget.cpp
Greg Clayton
gclayton at apple.com
Wed Jul 11 13:46:47 PDT 2012
Author: gclayton
Date: Wed Jul 11 15:46:47 2012
New Revision: 160072
URL: http://llvm.org/viewvc/llvm-project?rev=160072&view=rev
Log:
Fixed an issue where if you ask to search the global list of modules for a module with "target modules list", if it found a match in the current target, it would skip looking at the global list. Now if you ask for the global list, we use it and skip the target.
Modified:
lldb/trunk/source/Commands/CommandObjectTarget.cpp
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=160072&r1=160071&r2=160072&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Jul 11 15:46:47 2012
@@ -1743,27 +1743,7 @@
const size_t initial_size = module_list.GetSize ();
- size_t num_matches = 0;
-
- if (target)
- {
- num_matches = target->GetImages().FindModules (module_spec, module_list);
-
- // Not found in our module list for our target, check the main
- // shared module list in case it is a extra file used somewhere
- // else
- if (num_matches == 0)
- {
- module_spec.GetArchitecture() = target->GetArchitecture();
- num_matches = ModuleList::FindSharedModules (module_spec, module_list);
- }
- }
- else
- {
- num_matches = ModuleList::FindSharedModules (module_spec,module_list);
- }
-
- if (check_global_list && num_matches == 0)
+ if (check_global_list)
{
// Check the global list
Mutex::Locker locker(Module::GetAllocationModuleCollectionMutex());
@@ -1783,6 +1763,27 @@
}
}
}
+ else
+ {
+ if (target)
+ {
+ const size_t num_matches = target->GetImages().FindModules (module_spec, module_list);
+
+ // Not found in our module list for our target, check the main
+ // shared module list in case it is a extra file used somewhere
+ // else
+ if (num_matches == 0)
+ {
+ module_spec.GetArchitecture() = target->GetArchitecture();
+ ModuleList::FindSharedModules (module_spec, module_list);
+ }
+ }
+ else
+ {
+ ModuleList::FindSharedModules (module_spec,module_list);
+ }
+ }
+
return module_list.GetSize () - initial_size;
}
More information about the lldb-commits
mailing list