diff options
author | Jason Molenda <jmolenda@apple.com> | 2019-04-08 23:03:02 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2019-04-08 23:03:02 +0000 |
commit | 1724a179e7ae2d0485f0fc8fee7ac3a18cc29152 (patch) | |
tree | 87bbd2f536267e1116e4243d67fe446449be3c35 /lldb/source/API/SBTarget.cpp | |
parent | e794752bdfb334b64b2d356e9c0444572ad19da1 (diff) | |
download | bcm5719-llvm-1724a179e7ae2d0485f0fc8fee7ac3a18cc29152.tar.gz bcm5719-llvm-1724a179e7ae2d0485f0fc8fee7ac3a18cc29152.zip |
Rename Target::GetSharedModule to Target::GetOrCreateModule.
Add a flag to control whether the ModulesDidLoad notification is
called when a module is added. If the notifications are disabled,
the caller must call ModulesDidLoad after adding all the new modules,
but postponing this notification until they're all batched up can
allow for better efficiency than notifying one-by-one.
Change the name of the ModuleList notifier functions that a subclass
can implement to start with 'Notify' to make it clear what they are.
Add a NotifyModulesRemoved.
Add header documentation for the changed/updated methods.
Added defaulted-value 'notify' argument to ModuleList Append,
AppendIfNeeded, and Remove because callers working with a local
ModuleList don't have an obvious idea of what notify means in this
context. When the ModuleList is a part of the Target class, the
notify behavior matters.
DynamicLoaderDarwin has been updated so that libraries being
added/removed are correctly batched up before notifications are
sent. Added the TestModuleLoadedNotifys.py test to run on
Darwin to test this.
<rdar://problem/48293064>
Differential Revision: https://reviews.llvm.org/D60172
llvm-svn: 357955
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r-- | lldb/source/API/SBTarget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index e17355f0de3..fefc70afc65 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1591,7 +1591,7 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple, if (symfile) module_spec.GetSymbolFileSpec().SetFile(symfile, FileSpec::Style::native); - sb_module.SetSP(target_sp->GetSharedModule(module_spec)); + sb_module.SetSP(target_sp->GetOrCreateModule(module_spec, true /* notify */)); } return LLDB_RECORD_RESULT(sb_module); } @@ -1603,7 +1603,8 @@ lldb::SBModule SBTarget::AddModule(const SBModuleSpec &module_spec) { lldb::SBModule sb_module; TargetSP target_sp(GetSP()); if (target_sp) - sb_module.SetSP(target_sp->GetSharedModule(*module_spec.m_opaque_up)); + sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up, + true /* notify */)); return LLDB_RECORD_RESULT(sb_module); } |