From a1639ebf0d2e8501975a06b6cd58998b073531ce Mon Sep 17 00:00:00 2001 From: lfg Date: Fri, 8 May 2015 09:24:54 -0700 Subject: [PATCH] Add --port option to adb_gdb to allow simultaneous debugging of browser and render processes. Review URL: https://codereview.chromium.org/1131163002 Cr-Commit-Position: refs/heads/master@{#328963} --- build/android/adb_gdb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/android/adb_gdb b/build/android/adb_gdb index 3612f90991bd..65ec7b20b87d 100755 --- a/build/android/adb_gdb +++ b/build/android/adb_gdb @@ -97,6 +97,7 @@ NDK_DIR= NO_PULL_LIBS= PACKAGE_NAME= PID= +PORT= PRIVILEGED= PRIVILEGED_INDEX= PROGRAM_NAME="activity" @@ -147,6 +148,9 @@ for opt; do --pid=*) PID=$optarg ;; + --port=*) + PORT=$optarg + ;; --privileged) PRIVILEGED=true ;; @@ -329,6 +333,7 @@ Valid options: --gdb= Specify host gdb client binary. --target-arch= Specify NDK target arch. --adb= Specify host ADB binary. + --port= Specify the tcp port to use. --su-prefix= Prepend to 'adb shell' commands that are run by this script. This can be useful to use @@ -933,7 +938,9 @@ adb shell $COMMAND_PREFIX cp $TMP_TARGET_GDBSERVER $TARGET_GDBSERVER adb shell rm $TMP_TARGET_GDBSERVER fail_panic "Could not copy gdbserver to the device!" -PORT=5039 +if [ -z "$PORT" ]; then + PORT=5039 +fi HOST_PORT=$PORT TARGET_PORT=$PORT -- 2.11.4.GIT