From 14f7722133b299bae257c27a3ed0a882595dfd70 Mon Sep 17 00:00:00 2001 From: avallee Date: Wed, 30 Mar 2016 18:02:55 -0700 Subject: [PATCH] Add the url optional argument to adb_gdb --start. Allow the start option to specify an optional argument of to be started. BUG=597325 Review URL: https://codereview.chromium.org/1825933002 Cr-Original-Commit-Position: refs/heads/master@{#384167} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: c1a5c49e7ceb310e919697fde616f4ca1a081c1a --- android/adb_gdb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/adb_gdb b/android/adb_gdb index 188f51ce4..00c4f89cb 100755 --- a/android/adb_gdb +++ b/android/adb_gdb @@ -102,6 +102,7 @@ PULL_LIBS_DIR= SANDBOXED= SANDBOXED_INDEX= START= +START_URL= ATTACH_DELAY=1 SU_PREFIX= SYMBOL_DIR= @@ -177,6 +178,9 @@ for opt; do --script=*) GDBINIT=$optarg ;; + --start=*) + START_URL=$optarg + ;& # fallthrough --start) START=true ;; @@ -311,7 +315,7 @@ Valid options: --program-name= Specify program name (cosmetic only). --pid= Specify application process pid. --force Kill any previous debugging session, if any. - --start Start package's activity on device. + --start[=] Start package's activity on device. --attach-delay= Seconds to wait for gdbserver to attach to the remote process before starting gdb. Default 1. may be a float if your sleep(1) supports it. @@ -719,7 +723,7 @@ fi if [ "$START" ]; then log "Starting $PROGRAM_NAME on device." - adb_shell am start -n $PACKAGE_NAME/$ACTIVITY 2>/dev/null + adb_shell am start -n $PACKAGE_NAME/$ACTIVITY ${START_URL:+-d "$START_URL"} adb_shell ps | grep -q $PACKAGE_NAME fail_panic "Could not start $PROGRAM_NAME on device. Are you sure the \ package is installed?"