[Lldb-commits] [PATCH] D60172: Renamed Target::GetSharedModule to AddModule, allow for ModulesDidLoad to be delayed when batch adding Modules
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 5 20:39:35 PDT 2019
jasonmolenda updated this revision to Diff 194000.
jasonmolenda added a comment.
Added a testcase, TestModuleLoadedNotifys.
Renamed the pure virtual notifier methods in ModuleList to add 'Notify' at the start of their names, updated the names in subclass Target as well. Added a NotifyModulesRemoved and changed ModuleList::Remove(ModuleList&) so that it removes all of the modules one-by-one from the collection and then calls NotifyModulesRemoved() so they are broadcast as a group. I renamed the methods to make it clearer in Target that these are subclass implementations.
Changed Target::SetExecutableModule() so that it will load all dependent libraries without notifying, and send a group notification about all of them once they've been added.
Moved the call to LoadScriptingResourceForModule from Target::NotifyModuleAdded to Target::ModulesDidLoad so DynamicLoader plugins can call ModulesDidLoad with the full list of libraries and still get scripting files loaded.
I tried changing Target::GetOrCreateModule to return Expected<ModuleSP> but I wasn't thrilled with the double-dereference of the returned value when I started updating callers. It wasn't horrible, but it looked messy. I should go back and try again but my first shot at a few of them didn't look great.
I want to hand-test the scripting resource loading a bit on Monday but this is probably about what I'm doing for now. At this point, DynamicLoaderDarwin sends batched notifications on the CreateTarget() binary dependent binaries. It sends a batched notification when we start a real process and throw away all those binaries. It sends out batched notifications when we load the binaries back in via dyld notifications.
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 33663 bytes
Desc: not available
More information about the lldb-commits