[Lldb-commits] [lldb] r223752 - Implement remote process listing in Linux platform.
Stephane Sezer
sas at cd80.net
Mon Dec 8 19:18:10 PST 2014
Author: sas
Date: Mon Dec 8 21:18:09 2014
New Revision: 223752
URL: http://llvm.org/viewvc/llvm-project?rev=223752&view=rev
Log:
Implement remote process listing in Linux platform.
Summary:
Test Plan: Connect to a remote implementing the platform protocol (ds2 in this case), run `platform process list` and see processes being displayed.
Reviewers: vharron, tfiala, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6571
Modified:
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=223752&r1=223751&r2=223752&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon Dec 8 21:18:09 2014
@@ -457,6 +457,25 @@ PlatformLinux::GetProcessInfo (lldb::pid
return success;
}
+uint32_t
+PlatformLinux::FindProcesses (const ProcessInstanceInfoMatch &match_info,
+ ProcessInstanceInfoList &process_infos)
+{
+ uint32_t match_count = 0;
+ if (IsHost())
+ {
+ // Let the base class figure out the host details
+ match_count = Platform::FindProcesses (match_info, process_infos);
+ }
+ else
+ {
+ // If we are remote, we can only return results if we are connected
+ if (m_remote_platform_sp)
+ match_count = m_remote_platform_sp->FindProcesses (match_info, process_infos);
+ }
+ return match_count;
+}
+
bool
PlatformLinux::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
{
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h?rev=223752&r1=223751&r2=223752&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h Mon Dec 8 21:18:09 2014
@@ -81,6 +81,10 @@ namespace lldb_private {
bool
GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info) override;
+ uint32_t
+ FindProcesses (const ProcessInstanceInfoMatch &match_info,
+ ProcessInstanceInfoList &process_infos) override;
+
bool
GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch) override;
More information about the lldb-commits
mailing list