fix debugging script for the SampleApp

R=scroggo@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/164773002

git-svn-id: http://skia.googlecode.com/svn/trunk@13444 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-02-13 22:31:48 +00:00
parent d5414e5efe
commit e734c15aeb

View File

@ -11,8 +11,6 @@ PORT=5039
source $SCRIPT_DIR/utils/setup_adb.sh
echo "Installing Skia Android app"
$SCRIPT_DIR/android_install_skia_apk -f
# Forward local to remote socket connection.
$ADB forward "tcp:$PORT" "tcp:$PORT"
@ -29,6 +27,9 @@ adb_pull_if_needed /system/lib/libc.so $GDB_TMP_DIR
adb_pull_if_needed /data/data/com.skia/lib/libskia_android.so $GDB_TMP_DIR
adb_pull_if_needed /data/data/com.skia/lib/libSampleApp.so $GDB_TMP_DIR
echo "Pushing gdbserver..."
adb_push_if_needed $ANDROID_TOOLCHAIN/../gdbserver /data/local/tmp
# Launch the app
SK_COMMAND="$APP_ARGS"
echo "Running command $SK_COMMAND"
@ -37,7 +38,7 @@ adb shell am start -n com.skia/com.skia.SkiaSampleActivity
# Attach gdbserver to the app process
PID=$($ADB shell ps | grep com.skia | awk '{print $2}')
echo "Attaching to pid: $PID"
$ADB shell /data/data/com.skia/lib/gdbserver :$PORT --attach $PID &
$ADB shell /data/local/tmp/gdbserver :$PORT --attach $PID &
# Wait for gdbserver
sleep 2