diff options
author | jimmym <jimmym@opera.com> | 2015-02-04 08:03:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 16:03:43 +0000 |
commit | bb4db81dcbbe045c9ed2a7d05662af06064a3884 (patch) | |
tree | 3c1c242e5d172d1fc30848ad04d1b0e379813e5a /build/android/adb_gdb | |
parent | d86b0bfab454358afcd8c93b1a48d04196bd90be (diff) | |
download | chromium_src-bb4db81dcbbe045c9ed2a7d05662af06064a3884.zip chromium_src-bb4db81dcbbe045c9ed2a7d05662af06064a3884.tar.gz chromium_src-bb4db81dcbbe045c9ed2a7d05662af06064a3884.tar.bz2 |
Make it possible to debug Release builds on rooted phones
https://codereview.chromium.org/884993003 broke gdb debugging
on Release buils. This commit makes sure it works to debug
Debug and Release (only on rooted device) builds.
BUG=453379
Review URL: https://codereview.chromium.org/891743003
Cr-Commit-Position: refs/heads/master@{#314567}
Diffstat (limited to 'build/android/adb_gdb')
-rwxr-xr-x | build/android/adb_gdb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/android/adb_gdb b/build/android/adb_gdb index 97d37db..c71b816 100755 --- a/build/android/adb_gdb +++ b/build/android/adb_gdb @@ -26,6 +26,7 @@ fi TMPDIR= GDBSERVER_PIDFILE= TARGET_GDBSERVER= +COMMAND_PREFIX= clean_exit () { if [ "$TMPDIR" ]; then @@ -36,7 +37,7 @@ clean_exit () { fi if [ "$TARGET_GDBSERVER" ]; then log "Removing target gdbserver binary: $TARGET_GDBSERVER." - "$ADB" shell run-as "$PACKAGE_NAME" rm "$TARGET_GDBSERVER" >/dev/null 2>&1 + "$ADB" shell "$COMMAND_PREFIX" rm "$TARGET_GDBSERVER" >/dev/null 2>&1 fi log "Cleaning up: $TMPDIR" rm -rf "$TMPDIR" @@ -908,7 +909,7 @@ SOLIB_DIRS=$(find $PULL_LIBS_DIR -mindepth 1 -maxdepth 4 -type d | \ # Push gdbserver to the device log "Pushing gdbserver $GDBSERVER to $TARGET_GDBSERVER" adb push $GDBSERVER $TMP_TARGET_GDBSERVER &>/dev/null -adb shell run-as $PACKAGE_NAME cp $TMP_TARGET_GDBSERVER . +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!" |