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

Oleksiy Vyalov ovyalov at google.com
Sun Feb 15 18:48:39 PST 2015


Hi vharron, clayborg, chaoren,

Make PlatformPOSIX::KillProcess to delegate to a remote platform if connected.

http://reviews.llvm.org/D7660

Files:
  source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
  source/Plugins/Platform/POSIX/PlatformPOSIX.h

Index: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
===================================================================
--- source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -714,6 +714,18 @@
     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,
Index: source/Plugins/Platform/POSIX/PlatformPOSIX.h
===================================================================
--- source/Plugins/Platform/POSIX/PlatformPOSIX.h
+++ source/Plugins/Platform/POSIX/PlatformPOSIX.h
@@ -134,6 +134,9 @@
     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,

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7660.19998.patch
Type: text/x-patch
Size: 1238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150216/4061e848/attachment.bin>


More information about the lldb-commits mailing list