Skip to content

Commit 16194bf

Browse files
Revert "[platform process list] add a flag for showing the processes of all users"
This reverts commit 08781f4c53a177662c029d3da9c407ba65ae6747. llvm-svn: 374621
1 parent 914f382 commit 16194bf

File tree

5 files changed

+4
-64
lines changed

5 files changed

+4
-64
lines changed

lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -160,37 +160,9 @@ def respond(self, packet):
160160
return self.QListThreadsInStopReply()
161161
if packet.startswith("qMemoryRegionInfo:"):
162162
return self.qMemoryRegionInfo()
163-
if packet == "qQueryGDBServer":
164-
return self.qQueryGDBServer()
165-
if packet == "qHostInfo":
166-
return self.qHostInfo()
167-
if packet == "qGetWorkingDir":
168-
return self.qGetWorkingDir()
169-
if packet == "qsProcessInfo":
170-
return self.qsProcessInfo()
171-
if packet.startswith("qfProcessInfo"):
172-
return self.qfProcessInfo(packet)
173163

174164
return self.other(packet)
175165

176-
def qsProcessInfo(self):
177-
return "E04"
178-
179-
def qfProcessInfo(self, packet):
180-
if "all_users:1" in packet:
181-
return "pid:10;ppid:1;uid:1;gid:1;euid:1;egid:1;name:" + binascii.hexlify("/a/test_process") + ";"
182-
else:
183-
return "E04"
184-
185-
def qGetWorkingDir(self):
186-
return "2f"
187-
188-
def qHostInfo(self):
189-
return "ptrsize:8;endian:little;"
190-
191-
def qQueryGDBServer(self):
192-
return "E04"
193-
194166
def interrupt(self):
195167
raise self.UnexpectedPacketException()
196168

@@ -199,7 +171,7 @@ def cont(self):
199171

200172
def vCont(self, packet):
201173
raise self.UnexpectedPacketException()
202-
174+
203175
def readRegisters(self):
204176
return "00000000" * self.registerCount
205177

@@ -453,6 +425,7 @@ def _handlePacket(self, packet):
453425
class InvalidPacketException(Exception):
454426
pass
455427

428+
456429
class GDBRemoteTestBase(TestBase):
457430
"""
458431
Base class for GDB client tests.

lldb/source/Commands/CommandObjectPlatform.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,10 +1264,6 @@ class CommandObjectPlatformProcessList : public CommandObjectParsed {
12641264
verbose = true;
12651265
break;
12661266

1267-
case 'x':
1268-
match_info.SetMatchAllUsers(true);
1269-
break;
1270-
12711267
default:
12721268
llvm_unreachable("Unimplemented option");
12731269
}

lldb/source/Commands/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,6 @@ let Command = "platform process list" in {
591591
def platform_process_list_show_args : Option<"show-args", "A">,
592592
GroupRange<1, 6>,
593593
Desc<"Show process arguments instead of the process executable basename.">;
594-
def platform_process_list_all_users: Option<"all-users", "x">,
595-
GroupRange<1,6>,
596-
Desc<"Show processes matching all user IDs.">;
597594
def platform_process_list_verbose : Option<"verbose", "v">, GroupRange<1, 6>,
598595
Desc<"Enable verbose output.">;
599596
}

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,8 @@ uint32_t GDBRemoteCommunicationClient::FindProcesses(
21762176
if (match_info.GetProcessInfo().EffectiveGroupIDIsValid())
21772177
packet.Printf("egid:%u;",
21782178
match_info.GetProcessInfo().GetEffectiveGroupID());
2179-
packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0);
2179+
if (match_info.GetProcessInfo().EffectiveGroupIDIsValid())
2180+
packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0);
21802181
if (match_info.GetProcessInfo().GetArchitecture().IsValid()) {
21812182
const ArchSpec &match_arch =
21822183
match_info.GetProcessInfo().GetArchitecture();

0 commit comments

Comments
 (0)