| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 *) | 565 *) |
| 566 echo "$ARCH-linux-android" | 566 echo "$ARCH-linux-android" |
| 567 ;; | 567 ;; |
| 568 esac | 568 esac |
| 569 } | 569 } |
| 570 | 570 |
| 571 # Convert an NDK architecture name into a toolchain name prefix | 571 # Convert an NDK architecture name into a toolchain name prefix |
| 572 # $1: NDK architecture name (e.g. 'arm') | 572 # $1: NDK architecture name (e.g. 'arm') |
| 573 # Out: NDK toolchain name prefix (e.g. 'arm-linux-androideabi') | 573 # Out: NDK toolchain name prefix (e.g. 'arm-linux-androideabi') |
| 574 get_arch_toolchain_prefix () { | 574 get_arch_toolchain_prefix () { |
| 575 # Return the configure triplet, except for x86! | 575 # Return the configure triplet, except for x86 and x86_64! |
| 576 if [ "$1" = "x86" ]; then | 576 if [ "$1" = "x86" -o "$1" = "x86_64" ]; then |
| 577 echo "$1" | 577 echo "$1" |
| 578 else | 578 else |
| 579 get_arch_gnu_config $1 | 579 get_arch_gnu_config $1 |
| 580 fi | 580 fi |
| 581 } | 581 } |
| 582 | 582 |
| 583 # Find a NDK toolchain prebuilt file or sub-directory. | 583 # Find a NDK toolchain prebuilt file or sub-directory. |
| 584 # This will probe the various arch-specific toolchain directories | 584 # This will probe the various arch-specific toolchain directories |
| 585 # in the NDK for the needed file. | 585 # in the NDK for the needed file. |
| 586 # $1: NDK install path | 586 # $1: NDK install path |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 | 1042 |
| 1043 if [ "$VERBOSE" -gt 0 ]; then | 1043 if [ "$VERBOSE" -gt 0 ]; then |
| 1044 echo "### START $COMMANDS" | 1044 echo "### START $COMMANDS" |
| 1045 cat $COMMANDS | 1045 cat $COMMANDS |
| 1046 echo "### END $COMMANDS" | 1046 echo "### END $COMMANDS" |
| 1047 fi | 1047 fi |
| 1048 | 1048 |
| 1049 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" | 1049 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" |
| 1050 $GDB $GDB_ARGS -x $COMMANDS && | 1050 $GDB $GDB_ARGS -x $COMMANDS && |
| 1051 rm -f "$GDBSERVER_PIDFILE" | 1051 rm -f "$GDBSERVER_PIDFILE" |
| OLD | NEW |