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

via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 21 09:43:43 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);
----------------
jimingham wrote:

On Darwin, lldb has an extra service that can prompt for root credentials and then allow debugging root processes.  Presumably lldb-server could be taught to do the same thing on other systems.  It's also just useful when you are debugging a remote system to be able to see what's going on there, even if you can't attach to everything you see.

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


More information about the lldb-commits mailing list