summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index fcab7aff4a9..d5d1456d2a5 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -35,6 +35,7 @@
#include "lldb/Target/Platform.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StopInfo.h"
+#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Target/Thread.h"
@@ -1143,6 +1144,7 @@ Process::Finalize()
m_dynamic_checkers_ap.reset();
m_abi_sp.reset();
m_os_ap.reset();
+ m_system_runtime_ap.reset();
m_dyld_ap.reset();
m_thread_list_real.Destroy();
m_thread_list.Destroy();
@@ -2876,6 +2878,7 @@ Process::Launch (const ProcessLaunchInfo &launch_info)
Error error;
m_abi_sp.reset();
m_dyld_ap.reset();
+ m_system_runtime_ap.reset();
m_os_ap.reset();
m_process_input_reader.reset();
@@ -2944,6 +2947,10 @@ Process::Launch (const ProcessLaunchInfo &launch_info)
if (dyld)
dyld->DidLaunch();
+ SystemRuntime *system_runtime = GetSystemRuntime ();
+ if (system_runtime)
+ system_runtime->DidLaunch();
+
m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL));
// This delays passing the stopped event to listeners till DidLaunch gets
// a chance to complete...
@@ -2987,6 +2994,10 @@ Process::LoadCore ()
if (dyld)
dyld->DidAttach();
+ SystemRuntime *system_runtime = GetSystemRuntime ();
+ if (system_runtime)
+ system_runtime->DidAttach();
+
m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL));
// 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
@@ -3005,6 +3016,14 @@ Process::GetDynamicLoader ()
return m_dyld_ap.get();
}
+SystemRuntime *
+Process::GetSystemRuntime ()
+{
+ if (m_system_runtime_ap.get() == NULL)
+ m_system_runtime_ap.reset (SystemRuntime::FindPlugin(this));
+ return m_system_runtime_ap.get();
+}
+
Process::NextEventAction::EventActionResult
Process::AttachCompletionHandler::PerformAction (lldb::EventSP &event_sp)
@@ -3067,6 +3086,7 @@ Process::Attach (ProcessAttachInfo &attach_info)
m_abi_sp.reset();
m_process_input_reader.reset();
m_dyld_ap.reset();
+ m_system_runtime_ap.reset();
m_os_ap.reset();
lldb::pid_t attach_pid = attach_info.GetProcessID();
@@ -3239,6 +3259,10 @@ Process::CompleteAttach ()
if (dyld)
dyld->DidAttach();
+ SystemRuntime *system_runtime = GetSystemRuntime ();
+ if (system_runtime)
+ system_runtime->DidAttach();
+
m_os_ap.reset (OperatingSystem::FindPlugin (this, NULL));
// Figure out which one is the executable, and set that in our target:
const ModuleList &target_modules = m_target.GetImages();
@@ -5614,6 +5638,7 @@ Process::DidExec ()
target.GetSectionLoadList().Clear();
m_dynamic_checkers_ap.reset();
m_abi_sp.reset();
+ m_system_runtime_ap.reset();
m_os_ap.reset();
m_dyld_ap.reset();
m_image_tokens.clear();
OpenPOWER on IntegriCloud