[Lldb-commits] [lldb] r373760 - [process info] Remove assert in DoGetGroupName
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 4 09:56:23 PDT 2019
Author: wallace
Date: Fri Oct 4 09:56:23 2019
New Revision: 373760
URL: http://llvm.org/viewvc/llvm-project?rev=373760&view=rev
Log:
[process info] Remove assert in DoGetGroupName
Summary:
Disabling this assert prevents lldb-server from crashing, which prevents it from finding the user and group names of a given process list.
Before this change, the process list didn't contain names:
```
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS
====== ====== ========== ========== ========== ========== ============================== ============================
27585 982 10098 10098 10098 10098 com.LogiaGroup.LogiaDeck
27623 982 10098 10098 10098 10098 com.digitalturbine.ignite.suspend.DataUsageRecorderService
28024 982 10199 10199 10199 10199 com.google.vr.vrcore
28061 983 10353 10353 10353 10353 com.instagram.android:videoplayer
28121 982 10045 10045 10045 10045 com.sec.spp.push
28325 982 10247 10247 10247 10247 com.facebook.orca
28714 982 10367 10367 10367 10367 com.samsung.android.dialer
29867 3208 2000 2000 2000 2000 aarch64-unknown-linux-android /system/bin/sh-c /data/local/tmp/lldb-server platform --listen *:5557 --server --log-file /data/local/tmp/logs --log-channels gdb-remote all --log-channels lldb all
```
After this change, the list looks much better
```
PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS
====== ====== ========== ========== ========== ========== ============================== ============================
24459 1 wifi 1010 wifi 1010 aarch64-unknown-linux-android /vendor/bin/hw/wpa_supplicant-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -g at android:wpa_wlan0
25098 982 u0_a42 10042 u0_a42 10042 com.samsung.android.messaging
25442 982 u0_a65 10065 u0_a65 10065 com.samsung.android.mobileservice
25974 982 u0_a9 10009 u0_a9 10009 com.samsung.android.contacts
26377 982 radio 1001 radio 1001 com.samsung.android.incallui
26390 983 u0_a26 10026 u0_a26 10026 com.samsung.android.game.gametools
26876 983 u0_a306 10306 u0_a306 10306 com.tencent.mm:push
```
Reviewers: clayborg,aadsm,xiaobai,labath
Subscribers:
Modified:
lldb/trunk/source/Host/posix/HostInfoPosix.cpp
Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=373760&r1=373759&r2=373760&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Fri Oct 4 09:56:23 2019
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "lldb/Host/posix/HostInfoPosix.h"
-#include "lldb/Utility/UserIDResolver.h"
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/UserIDResolver.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
@@ -103,8 +103,6 @@ llvm::Optional<std::string> PosixUserIDR
if (group_info_ptr)
return std::string(group_info_ptr->gr_name);
}
-#else
- assert(false && "getgrgid_r() not supported on Android");
#endif
return llvm::None;
}
More information about the lldb-commits
mailing list