In the process of hoisting the LoadScriptingResourceForModule
out of Target::ModuleAdded and into Target::ModulesDidLoad,
I had ModulesDidLoad fetching the Target's entire image list
and look for scripting resources in those -- instead of only
looking for scripting resources in the modules that had
been added to the target's image list.
<rdar://problem/
50065315>
llvm-svn: 358929
void Target::ModulesDidLoad(ModuleList &module_list) {
- if (m_valid && module_list.GetSize()) {
-
- const ModuleList &modules = GetImages();
- const size_t num_images = modules.GetSize();
+ const size_t num_images = module_list.GetSize();
+ if (m_valid && num_images) {
for (size_t idx = 0; idx < num_images; ++idx) {
- ModuleSP module_sp(modules.GetModuleAtIndex(idx));
+ ModuleSP module_sp(module_list.GetModuleAtIndex(idx));
LoadScriptingResourceForModule(module_sp, this);
}
m_breakpoint_list.UpdateBreakpoints(module_list, true, false);