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

Unified Diff: platform_tools/android/bin/android_gdbserver

Issue 19920003: add debugging support for android on x86 phone (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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_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 &
« platform_tools/android/bin/android_gdb_exe ('K') | « platform_tools/android/bin/android_gdb_exe ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698