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

Unified Diff: platform_tools/android/bin/android_gdb_exe

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_gdb_exe
===================================================================
--- platform_tools/android/bin/android_gdb_exe (revision 10224)
+++ platform_tools/android/bin/android_gdb_exe (working copy)
@@ -4,6 +4,18 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+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 It would be preferable to do something like... wh
# setup the gdbserver
$SCRIPT_DIR/android_gdbserver $@
@@ -18,7 +30,7 @@
# variables that must match those in gdb_server
GDB_TMP_DIR=$(pwd)/android_gdb_tmp
-APP_NAME=$(basename $1)
+APP_NAME=$(basename $3)
djsollen 2013/07/22 13:18:18 replace $3 with ${gdbVars[0]}
PORT=5039
# Set up gdb commands
@@ -37,7 +49,11 @@
# Launch gdb client
echo "Entering gdb client shell"
-$ANDROID_TOOLCHAIN/arm-linux-androideabi-gdb -x $GDBSETUP
+if [ "$ANDROID_ARCH" == "x86" ]
+then
+ $ANDROID_TOOLCHAIN/i686-linux-android-gdb -x $GDBSETUP
+else
+ $ANDROID_TOOLCHAIN/arm-linux-androideabi-gdb -x $GDBSETUP
# Clean up
-rm -rf $GDB_TMP_DIR
+rm -rf $GDB_TMP_DIR
« no previous file with comments | « no previous file | platform_tools/android/bin/android_gdbserver » ('j') | platform_tools/android/bin/android_gdbserver » ('J')

Powered by Google App Engine
This is Rietveld 408576698