summaryrefslogtreecommitdiffstats
path: root/build/android/adb_gdb
diff options
context:
space:
mode:
authoradam.treat@samsung.com <adam.treat@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 18:56:35 +0000
committeradam.treat@samsung.com <adam.treat@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 18:56:35 +0000
commitfca5dd855d036edddb92fdc41301d8197ee09052 (patch)
tree9100cfdfbc66b209e220010958cef21c44676cc4 /build/android/adb_gdb
parentafec3507c7de28f18c06b8de361008f370bbf2a7 (diff)
downloadchromium_src-fca5dd855d036edddb92fdc41301d8197ee09052.zip
chromium_src-fca5dd855d036edddb92fdc41301d8197ee09052.tar.gz
chromium_src-fca5dd855d036edddb92fdc41301d8197ee09052.tar.bz2
Fix the adb_gdb script to honor the --gdb flag for a user specified gdb binary according to the existing usage.
BUG=295807 Review URL: https://codereview.chromium.org/23513083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/adb_gdb')
-rwxr-xr-xbuild/android/adb_gdb21
1 files changed, 13 insertions, 8 deletions
diff --git a/build/android/adb_gdb b/build/android/adb_gdb
index 0f5f2c4..c3ae3be 100755
--- a/build/android/adb_gdb
+++ b/build/android/adb_gdb
@@ -121,6 +121,9 @@ for opt; do
--gdbserver=*)
GDBSERVER=$optarg
;;
+ --gdb=*)
+ GDB=$optarg
+ ;;
--help|-h|-?)
HELP=true
;;
@@ -302,10 +305,10 @@ Valid options:
--annotate=<num> Enable gdb annotation.
--script=<file> Specify extra GDB init script.
- --gdbserver=<file> Specify targer gdbserver binary.
- --gdb=<program> Specify host gdb client binary.
+ --gdbserver=<file> Specify target gdbserver binary.
+ --gdb=<file> Specify host gdb client binary.
--target-arch=<name> Specify NDK target arch.
- --adb=<program> Specify host ADB binary.
+ --adb=<file> Specify host ADB binary.
--su-prefix=<prefix> Prepend <prefix> to 'adb shell' commands that are
run by this script. This can be useful to use
@@ -542,12 +545,14 @@ fi
ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN%/}
# Find host GDB client binary
-GDB=$(which $ANDROID_TOOLCHAIN/*-$GDBEXEPOSTFIX 2>/dev/null | head -1)
if [ -z "$GDB" ]; then
- panic "Can't find Android gdb client in your path, check your \
---toolchain path."
+ GDB=$(which $ANDROID_TOOLCHAIN/*-$GDBEXEPOSTFIX 2>/dev/null | head -1)
+ if [ -z "$GDBSERVER" ]; then
+ panic "Can't find Android gdb client in your path, check your \
+--toolchain or --gdb path."
+ fi
+ log "Host gdb client: $GDB"
fi
-log "Host gdb client: $GDB"
# Find gdbserver binary, we will later push it to /data/local/tmp
# This ensures that both gdbserver and $GDB talk the same binary protocol,
@@ -886,7 +891,7 @@ SOLIB_DIRS=$(find $PULL_LIBS_DIR -mindepth 1 -maxdepth 4 -type d | \
#
# Push gdbserver to the device
-log "Pushing gdbserver to $TARGET_GDBSERVER"
+log "Pushing gdbserver $GDBSERVER to $TARGET_GDBSERVER"
adb push $GDBSERVER $TARGET_GDBSERVER &>/dev/null
fail_panic "Could not copy gdbserver to the device!"