Chromium Code Reviews| Index: platform_tools/android/bin/android_gdbserver |
| =================================================================== |
| --- platform_tools/android/bin/android_gdbserver (revision 10224) |
| +++ platform_tools/android/bin/android_gdbserver (working copy) |
| @@ -1,15 +1,26 @@ |
| #!/bin/bash |
| # |
| # android_gdbserver: Pushes gdbserver. Starts debugging environment. |
| +deviceID="" |
| +if [[ $(echo "$1" | grep "^-d$") != "" ]]; |
| +then |
| + deviceID="$2" |
| +fi |
| +# hack for x86 support in android_setup.sh |
| +if [ "$deviceID" == "x86" ] || [ "$deviceID" == "razr_i" ] |
| +then |
| + ANDROID_ARCH="x86" |
| +fi |
|
djsollen
2013/07/22 13:18:18
you should be able to remove this code altogether.
|
| + |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| -APP_NAME=$(basename $1) |
| +APP_NAME=$(basename $3) |
| PORT=5039 |
| # Collect extra arguments to be passed to the Skia binary |
| shift |
| while (( "$#" )); do |
| - APP_ARGS="$APP_ARGS $1" |
| + APP_ARGS="$APP_ARGS $3" |
| shift |
| done |
| @@ -50,9 +61,8 @@ |
| # Kill all previous instances of gdbserver and skia_launcher to rid all port overriding errors. |
| echo "Killing any running Skia processes." |
| -$ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill |
| -$ADB shell ps | grep skia_launcher | awk '{print $2}' | xargs $ADB shell kill |
| - |
| +$ADB shell ps | grep gdbserver | awk '{print $4}' | xargs $ADB shell kill |
| +$ADB shell ps | grep skia_launcher | awk '{print $4}' | xargs $ADB shell kill |
| # Starting up gdbserver in android shell |
| echo "Starting gdbserver with command: skia_launcher $APP_NAME$APP_ARGS" |
| $ADB shell gdbserver :5039 /system/bin/skia_launcher $APP_NAME$APP_ARGS & |