[Lldb-commits] [lldb] r229577 - Make PlatformPOSIX::KillProcess to delegate to a remote platform if connected.

Oleksiy Vyalov ovyalov at google.com
Tue Feb 17 14:57:56 PST 2015


Author: ovyalov
Date: Tue Feb 17 16:57:56 2015
New Revision: 229577

URL: http://llvm.org/viewvc/llvm-project?rev=229577&view=rev
Log:
Make PlatformPOSIX::KillProcess to delegate to a remote platform if connected.

http://reviews.llvm.org/D7660


Modified:
    lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
    lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=229577&r1=229576&r2=229577&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Tue Feb 17 16:57:56 2015
@@ -714,6 +714,18 @@ PlatformPOSIX::LaunchProcess (ProcessLau
     return error;
 }
 
+lldb_private::Error
+PlatformPOSIX::KillProcess (const lldb::pid_t pid)
+{
+    if (IsHost())
+        return Platform::KillProcess (pid);
+
+    if (m_remote_platform_sp)
+        return m_remote_platform_sp->KillProcess (pid);
+
+    return Error ("the platform is not currently connected");
+}
+
 lldb::ProcessSP
 PlatformPOSIX::Attach (ProcessAttachInfo &attach_info,
                        Debugger &debugger,

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h?rev=229577&r1=229576&r2=229577&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h Tue Feb 17 16:57:56 2015
@@ -134,6 +134,9 @@ public:
     lldb_private::Error
     LaunchProcess (lldb_private::ProcessLaunchInfo &launch_info) override;
 
+    lldb_private::Error
+    KillProcess (const lldb::pid_t pid) override;
+
     lldb::ProcessSP
     Attach (lldb_private::ProcessAttachInfo &attach_info,
             lldb_private::Debugger &debugger,





More information about the lldb-commits mailing list