Rename Target::GetSharedModule to Target::GetOrCreateModule.
authorJason Molenda <jmolenda@apple.com>
Mon, 8 Apr 2019 23:03:02 +0000 (23:03 +0000)
committerJason Molenda <jmolenda@apple.com>
Mon, 8 Apr 2019 23:03:02 +0000 (23:03 +0000)
commit1724a179e7ae2d0485f0fc8fee7ac3a18cc29152
tree87bbd2f536267e1116e4243d67fe446449be3c35
parente794752bdfb334b64b2d356e9c0444572ad19da1
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
19 files changed:
lldb/include/lldb/Core/ModuleList.h
lldb/include/lldb/Target/Target.h
lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/main.cpp [new file with mode: 0644]
lldb/source/API/SBTarget.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Core/DynamicLoader.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Expression/FunctionCaller.cpp
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/source/Target/Target.cpp