[Lldb-commits] [PATCH] D68312: [gdb-remote] process properly effective uid
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 4 19:16:28 PDT 2019
wallace updated this revision to Diff 223359.
wallace added a comment.
added a test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68312/new/
https://reviews.llvm.org/D68312
Files:
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1906,7 +1906,7 @@
} else if (name.equals("euid")) {
uint32_t uid = UINT32_MAX;
value.getAsInteger(0, uid);
- process_info.SetEffectiveGroupID(uid);
+ process_info.SetEffectiveUserID(uid);
} else if (name.equals("gid")) {
uint32_t gid = UINT32_MAX;
value.getAsInteger(0, gid);
Index: lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
+++ lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
@@ -8,13 +8,13 @@
class TestPlatformClient(GDBRemoteTestBase):
- def test_process_list_with_all_users(self):
+ 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:1;gid:1;euid:1;egid:1;name:" + binascii.hexlify("/a/process") + ";args:"
+ return "pid:10;ppid:1;uid:2;gid:3;euid:4;egid:5;name:" + binascii.hexlify("/a/process") + ";args:"
else:
return "E04"
@@ -28,6 +28,10 @@
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68312.223359.patch
Type: text/x-patch
Size: 2325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191005/af2bbd1b/attachment.bin>
More information about the lldb-commits
mailing list