[Lldb-commits] [PATCH] D60172: Renamed Target::GetSharedModule to AddModule, allow for ModulesDidLoad to be delayed when batch adding Modules
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 3 00:53:22 PDT 2019
labath added a comment.
Thank you for taking the time to rename this function. I think this has been long overdue. However, I believe that the name `AddModule` might cause confusion coming from the other direction, as now one may think that it unconditionally adds a new module to the target (which also isn't true, as it will just reuse the existing one if it's already there). Maybe something like `GetOrCreateModule` would be better (and also in line with how llvm names these kinds of things)?
As for testing, doesn't this cause a eBroadcastBitModulesLoaded event to be sent through some SB API. You could subscribe to that and check that it comes only ~once, and contains the right modules. This won't test exactly the thing you're interested in, but it might be close enough.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60172/new/
https://reviews.llvm.org/D60172
More information about the lldb-commits
mailing list