diff options
author | Jason Molenda <jmolenda@apple.com> | 2019-04-22 22:42:29 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2019-04-22 22:42:29 +0000 |
commit | a38b8c8abce0233e7ffc8d9d8de2436505877d59 (patch) | |
tree | 3d50924f3b3936b70aea3d5cf684170dc26bc1ad | |
parent | d44a7be17b67b6a9d919a217715eeba168225448 (diff) | |
download | llvm-a38b8c8abce0233e7ffc8d9d8de2436505877d59.zip llvm-a38b8c8abce0233e7ffc8d9d8de2436505877d59.tar.gz llvm-a38b8c8abce0233e7ffc8d9d8de2436505877d59.tar.bz2 |
Fix a bug in my change to ModulesDidLoad in r357955.
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
-rw-r--r-- | lldb/source/Target/Target.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index c05102a..af88e47 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1651,12 +1651,10 @@ void Target::NotifyModulesRemoved(lldb_private::ModuleList &module_list) { 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); |