| Index: build/android/adb_gdb
|
| diff --git a/build/android/adb_gdb b/build/android/adb_gdb
|
| index ec0bb7e59d01558c6998045541bc5eeb6d5272b2..150eb5eba4adee17da7ee376ef9c5b197ab2c853 100755
|
| --- a/build/android/adb_gdb
|
| +++ b/build/android/adb_gdb
|
| @@ -841,7 +841,7 @@ fi
|
| if [ "$SU_PREFIX" ]; then
|
| # Need to check that this works properly.
|
| SU_PREFIX_TEST_LOG=$TMPDIR/su-prefix.log
|
| - adb_shell $SU_PREFIX echo "foo" > $SU_PREFIX_TEST_LOG 2>&1
|
| + adb_shell $SU_PREFIX \"echo "foo"\" > $SU_PREFIX_TEST_LOG 2>&1
|
| if [ $? != 0 -o "$(cat $SU_PREFIX_TEST_LOG)" != "foo" ]; then
|
| echo "ERROR: Cannot use '$SU_PREFIX' as a valid su prefix:"
|
| echo "$ adb shell $SU_PREFIX echo foo"
|
| @@ -867,7 +867,7 @@ log "Command prefix: '$COMMAND_PREFIX'"
|
| if [ "$PULL_LIBS" -a -z "$NO_PULL_LIBS" ]; then
|
| echo "Extracting system libraries into: $PULL_LIBS_DIR"
|
| rm -f $PULL_LIBS_DIR/build.prop
|
| - MAPPINGS=$(adb_shell $COMMAND_PREFIX cat /proc/$PID/maps)
|
| + MAPPINGS=$(adb_shell $COMMAND_PREFIX \"cat /proc/$PID/maps\")
|
| if [ $? != 0 ]; then
|
| echo "ERROR: Could not list process's memory mappings."
|
| if [ "$SU_PREFIX" ]; then
|
| @@ -944,10 +944,10 @@ host:localhost:$HOST_PORT to device:localhost:$TARGET_PORT!"
|
| #
|
| log "Starting gdbserver in the background:"
|
| GDBSERVER_LOG=$TMPDIR/gdbserver-$TMP_ID.log
|
| -log "adb shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \
|
| ---attach $PID"
|
| -("$ADB" shell $COMMAND_PREFIX $TARGET_GDBSERVER :$TARGET_PORT \
|
| - --attach $PID > $GDBSERVER_LOG 2>&1) &
|
| +log "adb shell $COMMAND_PREFIX \"$TARGET_GDBSERVER :$TARGET_PORT \
|
| +--attach $PID"\"
|
| +("$ADB" shell $COMMAND_PREFIX \"$TARGET_GDBSERVER :$TARGET_PORT \
|
| + --attach $PID\" > $GDBSERVER_LOG 2>&1) &
|
| GDBSERVER_PID=$!
|
| echo "$GDBSERVER_PID" > $GDBSERVER_PIDFILE
|
| log "background job pid: $GDBSERVER_PID"
|
|
|