Author: gclayton Date: Thu Feb 9 12:55:41 2017 New Revision: 294611 URL: http://llvm.org/viewvc/llvm-project?rev=294611&view=rev Log: Make sure we only load the OS plug-in once.
<rdar://problem/27580297> Modified: lldb/trunk/source/Target/Process.cpp Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=294611&r1=294610&r2=294611&view=diff ============================================================================== --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Thu Feb 9 12:55:41 2017 @@ -2798,7 +2798,8 @@ Error Process::Launch(ProcessLaunchInfo 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()); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits