[Lldb-commits] [PATCH] D68968: [android/process list] use arg0 as fallback for process name

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 14 19:45:56 PDT 2019


wallace created this revision.
wallace added reviewers: labath, clayborg, aadsm.
Herald added subscribers: lldb-commits, srhines.
Herald added a project: LLDB.

In systems like android, there are cases in which a process name can correspond to a package name (e.g. com.test.app), which is not an executable path. ProcessInfo has been assuming that the process name is an executable path, and as mentioned before, it's not always the case.
This package name is stored in Arg0, so we can use it as fallback.

After this change, I can see com.amazon.dee.app as process name. Before I couldn't

PID    PARENT USER       TRIPLE                         NAME




16876  1      shell                                     /system/bin/adbd
19941  982    u0_a239                                   com.amazon.dee.app

Another way to do it is to have a specific variable in ProcessInfo for app_bundle_name, which could be the actual fallback when the executable path is empty. However, I don't think there's a case in which Arg0 is not the correct value.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68968

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
  lldb/source/Utility/ProcessInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68968.224950.patch
Type: text/x-patch
Size: 6438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191015/34acdbc1/attachment.bin>


More information about the lldb-commits mailing list