Author: shafik Date: Tue Oct 8 09:24:28 2019 New Revision: 374077 URL: http://llvm.org/viewvc/llvm-project?rev=374077&view=rev Log: Revert "[platform process list] add a flag for showing the processes of all users"
This reverts commit 080f35fb875f52c924ee37ed4d56a51fe7056afa. Conflicts: packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py lldb/trunk/source/Commands/CommandObjectPlatform.cpp lldb/trunk/source/Commands/Options.td lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py?rev=374076&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py (removed) @@ -1,38 +0,0 @@ -import lldb -import binascii -import os -from lldbsuite.test.lldbtest import * -from lldbsuite.test.decorators import * -from gdbclientutils import * - - -class TestPlatformClient(GDBRemoteTestBase): - - def test_process_list(self): - """Test connecting to a remote linux platform""" - - class MyResponder(MockGDBServerResponder): - def qfProcessInfo(self, packet): - if "all_users:1" in packet: - return "pid:10;ppid:1;uid:2;gid:3;euid:4;egid:5;name:" + binascii.hexlify("/a/process") + ";args:" - else: - return "E04" - - self.server.responder = MyResponder() - - self.runCmd("platform select remote-linux") - - try: - self.runCmd("platform connect connect://localhost:%d" % - self.server.port) - self.assertTrue(self.dbg.GetSelectedPlatform().IsConnected()) - self.expect("platform process list -x", - startstr="1 matching process was found", endstr="process" + os.linesep) - self.expect("platform process list -xv", - substrs=[ - "PID PARENT USER GROUP EFF USER EFF GROUP", - "10 1 2 3 4 5"]) - self.expect("platform process list", - error="error: no processes were found on the \"remote-linux\" platform") - finally: - self.runCmd("platform disconnect") Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py?rev=374077&r1=374076&r2=374077&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py Tue Oct 8 09:24:28 2019 @@ -160,34 +160,9 @@ class MockGDBServerResponder: return self.QListThreadsInStopReply() if packet.startswith("qMemoryRegionInfo:"): return self.qMemoryRegionInfo() - if packet == "qQueryGDBServer": - return self.qQueryGDBServer() - if packet == "qHostInfo": - return self.qHostInfo() - if packet == "qGetWorkingDir": - return self.qGetWorkingDir() - if packet == "qsProcessInfo": - return self.qsProcessInfo() - if packet.startswith("qfProcessInfo"): - return self.qfProcessInfo(packet) return self.other(packet) - def qsProcessInfo(self): - return "E04" - - def qfProcessInfo(self, packet): - raise "E04" - - def qGetWorkingDir(self): - return "2f" - - def qHostInfo(self): - return "ptrsize:8;endian:little;" - - def qQueryGDBServer(self): - return "E04" - def interrupt(self): raise self.UnexpectedPacketException() @@ -196,7 +171,7 @@ class MockGDBServerResponder: def vCont(self, packet): raise self.UnexpectedPacketException() - + def readRegisters(self): return "00000000" * self.registerCount @@ -450,6 +425,7 @@ class MockGDBServer: class InvalidPacketException(Exception): pass + class GDBRemoteTestBase(TestBase): """ Base class for GDB client tests. Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=374077&r1=374076&r2=374077&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Tue Oct 8 09:24:28 2019 @@ -1264,10 +1264,6 @@ protected: verbose = true; break; - case 'x': - match_info.SetMatchAllUsers(true); - break; - default: llvm_unreachable("Unimplemented option"); } Modified: lldb/trunk/source/Commands/Options.td URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/Options.td?rev=374077&r1=374076&r2=374077&view=diff ============================================================================== --- lldb/trunk/source/Commands/Options.td (original) +++ lldb/trunk/source/Commands/Options.td Tue Oct 8 09:24:28 2019 @@ -591,9 +591,6 @@ let Command = "platform process list" in def platform_process_list_show_args : Option<"show-args", "A">, GroupRange<1, 6>, Desc<"Show process arguments instead of the process executable basename.">; - def platform_process_list_all_users: Option<"all-users", "x">, - GroupRange<1,6>, - Desc<"Show processes matching all user IDs.">; def platform_process_list_verbose : Option<"verbose", "v">, GroupRange<1, 6>, Desc<"Enable verbose output.">; } Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=374077&r1=374076&r2=374077&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Tue Oct 8 09:24:28 2019 @@ -2176,7 +2176,8 @@ uint32_t GDBRemoteCommunicationClient::F if (match_info.GetProcessInfo().EffectiveGroupIDIsValid()) packet.Printf("egid:%u;", match_info.GetProcessInfo().GetEffectiveGroupID()); - packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0); + if (match_info.GetProcessInfo().EffectiveGroupIDIsValid()) + packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0); if (match_info.GetProcessInfo().GetArchitecture().IsValid()) { const ArchSpec &match_arch = match_info.GetProcessInfo().GetArchitecture(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits