[Lldb-commits] [lldb] [lldb][Android] Fix platform process list regression (PR #164333)
Emre Kultursay via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 20 20:33:03 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);
----------------
emrekultursay wrote:
I don't see the point of querying all processes, when the Android security model only allows attaching to the processes running as the same user as `lldb-server`. Shouldn't we list only those processes that we can debug?
https://github.com/llvm/llvm-project/pull/164333
More information about the lldb-commits
mailing list