forked from openkylin/platform_build
Enable gdbclient to accept both name and pid of the process
Change-Id: I10234ddb2e52de302818e1b5b27a8f35651c4395
This commit is contained in:
parent
76ace42ca2
commit
e9d04bf88b
|
@ -785,7 +785,11 @@ function gdbclient()
|
|||
local PID
|
||||
local PROG="$3"
|
||||
if [ "$PROG" ] ; then
|
||||
PID=`pid $3`
|
||||
if [[ "$PROG" =~ ^[0-9]+$ ]] ; then
|
||||
PID="$3"
|
||||
else
|
||||
PID=`pid $3`
|
||||
fi
|
||||
adb forward "tcp$PORT" "tcp$PORT"
|
||||
adb shell gdbserver $PORT --attach $PID &
|
||||
sleep 2
|
||||
|
|
Loading…
Reference in New Issue