diff options
author | 2013-08-06 20:32:29 +0000 | |
---|---|---|
committer | 2013-08-06 20:32:29 +0000 | |
commit | 7627535b8f968ba135e0ec16d15f30c31fe786d4 (patch) | |
tree | a8f4bf53e7ee4fa6a9ca9beeddf9adb172991622 /platform_tools/android/bin/android_gdb_exe | |
parent | aa2d35144b92e71f377942468080547d00b52868 (diff) |
Re-organize Android scripts
Addresses https://code.google.com/p/skia/issues/detail?id=1486
R=djsollen@google.com
Review URL: https://codereview.chromium.org/22411004
git-svn-id: http://skia.googlecode.com/svn/trunk@10585 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools/android/bin/android_gdb_exe')
-rwxr-xr-x | platform_tools/android/bin/android_gdb_exe | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/platform_tools/android/bin/android_gdb_exe b/platform_tools/android/bin/android_gdb_exe index 190f223e56..1d2c36118f 100755 --- a/platform_tools/android/bin/android_gdb_exe +++ b/platform_tools/android/bin/android_gdb_exe @@ -2,30 +2,11 @@ # # android_gdb: Pushes gdbserver. Connects and enters debugging environment. -deviceID="" -while (( "$#" )); do - - if [[ $(echo "$1" | grep "^-d$") != "" ]]; - then - deviceID="$2" - shift - else - gdbVars=("${gdbVars[@]}" "$1") - fi - - shift -done - -# hack for x86 support in android_setup.sh -if [ "$deviceID" == "x86" ] || [ "$deviceID" == "razr_i" ] -then - export ANDROID_ARCH=x86 -fi - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/android_setup.sh # setup the gdbserver -$SCRIPT_DIR/android_gdbserver ${gdbVars[@]} +$SCRIPT_DIR/android_gdbserver -d ${DEVICE_ID} ${APP_ARGS} # quit if gdbserver setup failed if [[ "$?" != "0" ]]; then @@ -38,7 +19,7 @@ sleep 2 # variables that must match those in gdb_server GDB_TMP_DIR=$(pwd)/android_gdb_tmp -APP_NAME=$(basename ${gdbVars[0]}) +APP_NAME=${APP_ARGS[0]} PORT=5039 # Set up gdb commands @@ -53,8 +34,6 @@ echo "break launch_app" >> $GDBSETUP echo "continue" >> $GDBSETUP echo "sharedLibrary $APP_NAME" >> $GDBSETUP -source $SCRIPT_DIR/android_setup.sh - # Launch gdb client echo "Entering gdb client shell" if [ "$ANDROID_ARCH" == "x86" ] |