================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to