summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2017-02-09 18:55:41 +0000
committerGreg Clayton <gclayton@apple.com>2017-02-09 18:55:41 +0000
commit29eeea00e12ee33728ead258c7d6466d79f8ca1d (patch)
treedc4f40974eb8b386c7f4ecb0dc50a8016d041692 /lldb/source/Target/Process.cpp
parente0b5c2acbdecb02f15dfa78b7a6c9dd9b542f36e (diff)
downloadbcm5719-llvm-29eeea00e12ee33728ead258c7d6466d79f8ca1d.tar.gz
bcm5719-llvm-29eeea00e12ee33728ead258c7d6466d79f8ca1d.zip
Make sure we only load the OS plug-in once.
<rdar://problem/27580297> llvm-svn: 294611
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index c72662e4e34..290bab74b5f 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2798,7 +2798,8 @@ Error Process::Launch(ProcessLaunchInfo &launch_info) {
if (system_runtime)
system_runtime->DidLaunch();
- LoadOperatingSystemPlugin(false);
+ if (!m_os_ap)
+ LoadOperatingSystemPlugin(false);
// Note, the stop event was consumed above, but not handled. This
// was done
@@ -2862,7 +2863,9 @@ Error Process::LoadCore() {
if (system_runtime)
system_runtime->DidAttach();
- m_os_ap.reset(OperatingSystem::FindPlugin(this, nullptr));
+ if (!m_os_ap)
+ LoadOperatingSystemPlugin(false);
+
// We successfully loaded a core file, now pretend we stopped so we can
// show all of the threads in the core file and explore the crashed
// state.
@@ -3205,7 +3208,8 @@ void Process::CompleteAttach() {
}
}
- m_os_ap.reset(OperatingSystem::FindPlugin(this, nullptr));
+ if (!m_os_ap)
+ LoadOperatingSystemPlugin(false);
// Figure out which one is the executable, and set that in our target:
const ModuleList &target_modules = GetTarget().GetImages();
std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
OpenPOWER on IntegriCloud