summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-02-04 23:19:15 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-02-04 23:19:15 +0000
commit1ef7b2c89794d6644a8a7fe1bad944e4ed1652e3 (patch)
treef7286d3776e8bbda3131793fbf3927d25006c198 /lldb/source/Target
parent2c1990778dcd748cc86392aad21197dd8e9b2808 (diff)
downloadbcm5719-llvm-1ef7b2c89794d6644a8a7fe1bad944e4ed1652e3.tar.gz
bcm5719-llvm-1ef7b2c89794d6644a8a7fe1bad944e4ed1652e3.zip
Extend SBPlatform with capability to launch/terminate a process remotely. Integrate this change into test framework in order to spawn processes on a remote target.
http://reviews.llvm.org/D7263 llvm-svn: 228230
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/Platform.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 086e1a7e4a5..09c9efc14b0 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1103,6 +1103,20 @@ Platform::LaunchProcess (ProcessLaunchInfo &launch_info)
return error;
}
+Error
+Platform::KillProcess (const lldb::pid_t pid)
+{
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PLATFORM));
+ if (log)
+ log->Printf ("Platform::%s, pid %" PRIu64, __FUNCTION__, pid);
+
+ if (!IsHost ())
+ return Error ("base lldb_private::Platform class can't launch remote processes");
+
+ Host::Kill (pid, SIGTERM);
+ return Error();
+}
+
lldb::ProcessSP
Platform::DebugProcess (ProcessLaunchInfo &launch_info,
Debugger &debugger,
OpenPOWER on IntegriCloud