diff options
| author | Jim Ingham <jingham@apple.com> | 2018-04-17 20:44:47 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2018-04-17 20:44:47 +0000 |
| commit | 1ecb34f4ab983869eb3161d687f2994c6e0c69be (patch) | |
| tree | 9cd26cc3d44e46ea0bce09c39cf326bdaea76853 /lldb/source/Target/Process.cpp | |
| parent | f4832793924d1321f2b95622bce2405835351070 (diff) | |
| download | bcm5719-llvm-1ecb34f4ab983869eb3161d687f2994c6e0c69be.tar.gz bcm5719-llvm-1ecb34f4ab983869eb3161d687f2994c6e0c69be.zip | |
Change PlatformPosix::DoLoadImage to use a UtilityFunction.
That way we won't have to compile a new expression every time we want
dlopen a library.
<rdar://problem/32626584>
Differential Revision: https://reviews.llvm.org/D45703
llvm-svn: 330214
Diffstat (limited to 'lldb/source/Target/Process.cpp')
| -rw-r--r-- | lldb/source/Target/Process.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 2417d894803..7486480d47c 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -30,6 +30,7 @@ #include "lldb/Expression/DiagnosticManager.h" #include "lldb/Expression/IRDynamicChecks.h" #include "lldb/Expression/UserExpression.h" +#include "lldb/Expression/UtilityFunction.h" #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" @@ -6245,3 +6246,15 @@ Status Process::UpdateAutomaticSignalFiltering() { // No automatic signal filtering to speak of. return Status(); } + +UtilityFunction *Process::GetLoadImageUtilityFunction(Platform *platform) { + if (platform != GetTarget().GetPlatform().get()) + return nullptr; + return m_dlopen_utility_func_up.get(); +} + +void Process::SetLoadImageUtilityFunction(std::unique_ptr<UtilityFunction> + utility_func_up) { + m_dlopen_utility_func_up.swap(utility_func_up); +} + |

