OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 # A generic script used to attach to a running Chromium process and | 8 # A generic script used to attach to a running Chromium process and |
9 # debug it. Most users should not use this directly, but one of the | 9 # debug it. Most users should not use this directly, but one of the |
10 # wrapper scripts like adb_gdb_content_shell | 10 # wrapper scripts like adb_gdb_content_shell |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 # $1: NDK install path | 466 # $1: NDK install path |
467 # $2: NDK architecture name | 467 # $2: NDK architecture name |
468 # $3: prebuilt sub-path to look for. | 468 # $3: prebuilt sub-path to look for. |
469 # Out: file path, or empty if none is found. | 469 # Out: file path, or empty if none is found. |
470 get_ndk_toolchain_prebuilt () { | 470 get_ndk_toolchain_prebuilt () { |
471 local NDK_DIR="${1%/}" | 471 local NDK_DIR="${1%/}" |
472 local ARCH="$2" | 472 local ARCH="$2" |
473 local SUBPATH="$3" | 473 local SUBPATH="$3" |
474 local NAME="$(get_arch_toolchain_prefix $ARCH)" | 474 local NAME="$(get_arch_toolchain_prefix $ARCH)" |
475 local FILE TARGET | 475 local FILE TARGET |
476 FILE=$NDK_DIR/toolchains/$NAME-4.6/prebuilt/$SUBPATH | 476 FILE=$NDK_DIR/toolchains/$NAME-4.8/prebuilt/$SUBPATH |
477 if [ ! -f "$FILE" ]; then | 477 if [ ! -f "$FILE" ]; then |
478 FILE=$NDK_DIR/toolchains/$NAME-4.8/prebuilt/$SUBPATH | 478 FILE=$NDK_DIR/toolchains/$NAME-4.9/prebuilt/$SUBPATH |
479 if [ ! -f "$FILE" ]; then | 479 if [ ! -f "$FILE" ]; then |
480 FILE=$NDK_DIR/toolchains/$NAME-4.4.3/prebuilt/$SUBPATH | 480 FILE=$NDK_DIR/toolchains/$NAME-4.6/prebuilt/$SUBPATH |
481 if [ ! -f "$FILE" ]; then | 481 if [ ! -f "$FILE" ]; then |
482 FILE= | 482 FILE= |
483 fi | 483 fi |
484 fi | 484 fi |
485 fi | 485 fi |
486 echo "$FILE" | 486 echo "$FILE" |
487 } | 487 } |
488 | 488 |
489 # Find the path to an NDK's toolchain full prefix for a given architecture | 489 # Find the path to an NDK's toolchain full prefix for a given architecture |
490 # $1: NDK install path | 490 # $1: NDK install path |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 988 |
989 if [ "$VERBOSE" -gt 0 ]; then | 989 if [ "$VERBOSE" -gt 0 ]; then |
990 echo "### START $COMMANDS" | 990 echo "### START $COMMANDS" |
991 cat $COMMANDS | 991 cat $COMMANDS |
992 echo "### END $COMMANDS" | 992 echo "### END $COMMANDS" |
993 fi | 993 fi |
994 | 994 |
995 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" | 995 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" |
996 $GDB $GDB_ARGS -x $COMMANDS && | 996 $GDB $GDB_ARGS -x $COMMANDS && |
997 rm -f "$GDBSERVER_PIDFILE" | 997 rm -f "$GDBSERVER_PIDFILE" |
OLD | NEW |