Commit 899f5b3f authored by cathiechen's avatar cathiechen Committed by Commit bot

Fixing the pushing gdbserver problem while setting --su-prefix="su -c"

COMMAND_PREFIX and COMMAND_SUFFIX should be used simultaneously

BUG=

Review-Url: https://codereview.chromium.org/2295103002
Cr-Commit-Position: refs/heads/master@{#415623}
parent da597b2f
......@@ -25,6 +25,7 @@ TMPDIR=
GDBSERVER_PIDFILE=
TARGET_GDBSERVER=
COMMAND_PREFIX=
COMMAND_SUFFIX=
clean_exit () {
if [ "$TMPDIR" ]; then
......@@ -35,7 +36,7 @@ clean_exit () {
fi
if [ "$TARGET_GDBSERVER" ]; then
log "Removing target gdbserver binary: $TARGET_GDBSERVER."
"$ADB" shell "$COMMAND_PREFIX" rm "$TARGET_GDBSERVER" >/dev/null 2>&1
"$ADB" shell "$COMMAND_PREFIX" rm "$TARGET_GDBSERVER" "$COMMAND_SUFFIX" >/dev/null 2>&1
fi
log "Cleaning up: $TMPDIR"
rm -rf "$TMPDIR"
......@@ -920,7 +921,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 $COMMAND_PREFIX cp $TMP_TARGET_GDBSERVER $TARGET_GDBSERVER
adb shell $COMMAND_PREFIX cp $TMP_TARGET_GDBSERVER $TARGET_GDBSERVER $COMMAND_SUFFIX
adb shell rm $TMP_TARGET_GDBSERVER
fail_panic "Could not copy gdbserver to the device!"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment