| 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, or adb_gdb_drt | 10 # wrapper scripts like adb_gdb_content_shell |
| 11 # | 11 # |
| 12 # Use --help to print full usage instructions. | 12 # Use --help to print full usage instructions. |
| 13 # | 13 # |
| 14 | 14 |
| 15 PROGNAME=$(basename "$0") | 15 PROGNAME=$(basename "$0") |
| 16 PROGDIR=$(dirname "$0") | 16 PROGDIR=$(dirname "$0") |
| 17 | 17 |
| 18 # Location of Chromium-top-level sources. | 18 # Location of Chromium-top-level sources. |
| 19 CHROMIUM_SRC=$(cd "$PROGDIR"/../.. && pwd 2>/dev/null) | 19 CHROMIUM_SRC=$(cd "$PROGDIR"/../.. && pwd 2>/dev/null) |
| 20 | 20 |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 if [ "$VERBOSE" -gt 0 ]; then | 955 if [ "$VERBOSE" -gt 0 ]; then |
| 956 echo "### START $COMMANDS" | 956 echo "### START $COMMANDS" |
| 957 cat $COMMANDS | 957 cat $COMMANDS |
| 958 echo "### END $COMMANDS" | 958 echo "### END $COMMANDS" |
| 959 fi | 959 fi |
| 960 | 960 |
| 961 log "Launching gdb client: $GDB $GDBARGS -x $COMMANDS" | 961 log "Launching gdb client: $GDB $GDBARGS -x $COMMANDS" |
| 962 $GDB $GDBARGS -x $COMMANDS && | 962 $GDB $GDBARGS -x $COMMANDS && |
| 963 rm -f "$GDBSERVER_PIDFILE" | 963 rm -f "$GDBSERVER_PIDFILE" |
| OLD | NEW |