Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: platform_tools/android/bin/android_gdb_apk

Issue 865943007: Cleanup the android scripts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: actually saving the file Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platform_tools/android/bin/android_gdb_apk
diff --git a/platform_tools/android/bin/android_gdb_apk b/platform_tools/android/bin/android_gdb_apk
deleted file mode 100755
index 5d8a394e687368809de2cc5c87fc25d8bd6e0a57..0000000000000000000000000000000000000000
--- a/platform_tools/android/bin/android_gdb_apk
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# android_gdb: Pushes parameter binary and gdbserver. Connects
-# and enters debugging environment.
-
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-source $SCRIPT_DIR/android_setup.sh
-
-APP_NAME=${APP_ARGS[0]}
-PORT=5039
-
-source $SCRIPT_DIR/utils/setup_adb.sh
-
-
-# Forward local to remote socket connection.
-$ADB forward "tcp:$PORT" "tcp:$PORT"
-
-# We kill all previous instances of gdbserver to rid all port overriding errors.
-$ADB shell ps | grep gdbserver | awk '{print $2}' | xargs -r $ADB shell kill
-
-# We need the debug symbols from these files
-GDB_TMP_DIR=$(pwd)/android_gdb_tmp
-mkdir -p $GDB_TMP_DIR
-echo "Copying symbol files"
-adb_pull_if_needed /system/bin/app_process $GDB_TMP_DIR
-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"
-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/local/tmp/gdbserver :$PORT --attach $PID &
-
-# Wait for gdbserver
-sleep 2
-
-# Set up gdb commands
-GDBSETUP=$GDB_TMP_DIR/gdb.setup
-echo "file $GDB_TMP_DIR/app_process" >> $GDBSETUP
-echo "target remote :$PORT" >> $GDBSETUP
-echo "set solib-absolute-prefix $GDB_TMP_DIR" >> $GDBSETUP
-echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP
-
-# Launch gdb client
-echo "Entering gdb client shell"
-GDB_COMMAND=$(command ls "$ANDROID_TOOLCHAIN"/*-gdb | head -n1)
-"$GDB_COMMAND" -x $GDBSETUP
-
-# Clean up
-rm -rf $GDB_TMP_DIR
-
« no previous file with comments | « no previous file | platform_tools/android/bin/android_gdb_app » ('j') | platform_tools/android/bin/android_gdb_native » ('J')

Powered by Google App Engine
This is Rietveld 408576698