Skip to content

Commit 6fcf068

Browse files
committedOct 11, 2019
Revert "[platform process list] add a flag for showing the processes of all users"
Summary: This reverts commit e4ac611cd787f3f0e727a394e96fb1a5c3b19ccb. There's a failure according to http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2538/testReport/junit/lldb-api/functionalities_gdb_remote_client/TestPlatformClient_py/ Reviewers: labath, aadsm, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68883 llvm-svn: 374603
1 parent afa8903 commit 6fcf068

File tree

5 files changed

+4
-69
lines changed

5 files changed

+4
-69
lines changed
 

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

-35
This file was deleted.

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

+2-26
Original file line numberDiff line numberDiff line change
@@ -160,34 +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-
raise "E04"
181-
182-
def qGetWorkingDir(self):
183-
return "2f"
184-
185-
def qHostInfo(self):
186-
return "ptrsize:8;endian:little;"
187-
188-
def qQueryGDBServer(self):
189-
return "E04"
190-
191166
def interrupt(self):
192167
raise self.UnexpectedPacketException()
193168

@@ -196,7 +171,7 @@ def cont(self):
196171

197172
def vCont(self, packet):
198173
raise self.UnexpectedPacketException()
199-
174+
200175
def readRegisters(self):
201176
return "00000000" * self.registerCount
202177

@@ -450,6 +425,7 @@ def _handlePacket(self, packet):
450425
class InvalidPacketException(Exception):
451426
pass
452427

428+
453429
class GDBRemoteTestBase(TestBase):
454430
"""
455431
Base class for GDB client tests.

‎lldb/source/Commands/CommandObjectPlatform.cpp

-4
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

-3
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

+2-1
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)
Please sign in to comment.