[script] Android attach gdb to target
This commit is contained in:
parent
6d8862191c
commit
43bd1d448a
10
scripts/attachSystem.sh
Executable file
10
scripts/attachSystem.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
adb wait-for-device && adb forward tcp:5039 tcp:5039
|
||||
pid=$(adb shell ps | grep system_server | awk '{print $2}')
|
||||
adb shell gdbserver :5039 --attach $pid
|
||||
else
|
||||
adb wait-for-device && adb forward tcp:5040 tcp:5040 && adb shell gdbserver :5040 --attach $( adb shell ps | grep $@ | awk '{print $2}')
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user