[Lldb-commits] [lldb] [lldb][Android] Fix platform process list regression (PR #164333)

Chad Smith via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 20 21:30:49 PDT 2025


================
@@ -652,75 +709,169 @@ PlatformAndroid::FindProcesses(const ProcessInstanceInfoMatch &match_info,
     return 0;
   }
 
-  // Use 'pidof' command to get PIDs for the process name.
-  // Quote the process name to handle special characters (spaces, etc.)
-  std::string pidof_output;
-  StreamString command;
-  command.Printf("pidof '%s'", process_name.c_str());
-  error = adb->Shell(command.GetData(), seconds(5), &pidof_output);
+  std::string ps_output;
+  error = adb->Shell("ps -A -o PID,ARGS", seconds(5), &ps_output);
----------------
cs01 wrote:

I believe the full list of potentially non-debuggable processes is shown on non-Android platforms too. I can check tomorrow. I would prefer to follow whatever convention lldb has for this in general. 

https://github.com/llvm/llvm-project/pull/164333


More information about the lldb-commits mailing list