[Lldb-commits] [lldb] r373953 - [gdb-remote] process properly effective uid
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 7 13:26:49 PDT 2019
Author: wallace
Date: Mon Oct 7 13:26:49 2019
New Revision: 373953
URL: http://llvm.org/viewvc/llvm-project?rev=373953&view=rev
Log:
[gdb-remote] process properly effective uid
Summary:
Someone wrote SetEffectiveSetEffectiveGroupID instead of SetEffectiveUserID.
After this fix, the android process list can show user names, e.g.
```
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS
====== ====== ========== ========== ========== ========== ============================== ============================
529 1 root 0 root 0 /sbin/ueventd
```
Reviewers: labath,clayborg,aadsm,xiaobai
Subscribers:
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Modified: 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=373953&r1=373952&r2=373953&view=diff
==============================================================================
--- 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 Mon Oct 7 13:26:49 2019
@@ -8,13 +8,13 @@ from gdbclientutils import *
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 @@ class TestPlatformClient(GDBRemoteTestBa
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:
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=373953&r1=373952&r2=373953&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Mon Oct 7 13:26:49 2019
@@ -1906,7 +1906,7 @@ bool GDBRemoteCommunicationClient::Decod
} 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);
More information about the lldb-commits
mailing list