The gdbrunner script executes "ps" to list all running processes and
this needs to be changed to "ps -A" (toybox) for Android O instead of
"ps -w" (busybox) for custom ROMs or "ps" (toolbox) as default.
Test: manual
Change-Id: I99606cdf51b124369e4d0fcfe5917109cefe408c
gdbclient.py -r allows to provide an executable to be run on the target.
Before this patch the absolute path of the executable had to be
provided. This was inconvenient as the user has to first look up for the
exe on the target before debuging it.
With this patch, gdbclient.py will look for the executable on the
target if an absolute path is not provided.
Test: gdbserver -r ls
Change-Id: I610fd0a57b034ba8864874eeb1f7345d4a7daad9
Signed-off-by: Kevin Rocard <krocard@google.com>
Rename it from `user` to `run_as_cmd` to match the use of this method
in handle_switches in scripts/gdbclient.py.
Test: Run scripts/gdbclient.py -p <PID> on suspended process having pid <PID>
Change-Id: I9820858b1f43d5cb25a9a59e9df618ed4e47f3f0
Switch from assuming that "root" meant su to an explicit prepended
argument, to allow things like `gdbclient.py --user shell`.
Test: gdbclient.py --user shell -r /system/bin/ls
Change-Id: I9d02eea7c6d79898ed8b13817e009630b0f9536a
gdbclient.py is always downloading the stripped version of executable
files from the device. This CL first tries to find the unstripped local
file before falling back to the stripped version.
Bug: http://b/24947939
Change-Id: I7a49d0d8b28590ee99ce892d3e3476921f4ae974