commit | e9d04bf88bba9cf0ba274e2c613cdb00ccfae001 | [log] [tgz] |
---|---|---|
author | Grace Kloba <klobag@google.com> | Sat Apr 30 11:04:05 2011 -0700 |
committer | Grace Kloba <klobag@google.com> | Sat Apr 30 11:04:05 2011 -0700 |
tree | 7449ced529a862e79c2af90fd056f39cab3aa8d0 | |
parent | 76ace42ca222bf1fa13da48a6fb83a6bb5f8efc4 [diff] [blame] |
Enable gdbclient to accept both name and pid of the process Change-Id: I10234ddb2e52de302818e1b5b27a8f35651c4395
diff --git a/envsetup.sh b/envsetup.sh index 3973479..e0b5748 100644 --- a/envsetup.sh +++ b/envsetup.sh
@@ -785,7 +785,11 @@ 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