| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 EOF | 332 EOF |
| 333 exit 0 | 333 exit 0 |
| 334 fi | 334 fi |
| 335 | 335 |
| 336 if [ -z "$PACKAGE_NAME" ]; then | 336 if [ -z "$PACKAGE_NAME" ]; then |
| 337 panic "Please specify a package name on the command line. See --help." | 337 panic "Please specify a package name on the command line. See --help." |
| 338 fi | 338 fi |
| 339 | 339 |
| 340 if [ -z "$NDK_DIR" ]; then | 340 if [ -z "$NDK_DIR" ]; then |
| 341 ANDROID_NDK_ROOT=$(PYTHONPATH=build/android python -c \ | 341 ANDROID_NDK_ROOT=$(PYTHONPATH=$CHROMIUM_SRC/build/android python -c \ |
| 342 'from pylib.constants import ANDROID_NDK_ROOT; print ANDROID_NDK_ROOT,') | 342 'from pylib.constants import ANDROID_NDK_ROOT; print ANDROID_NDK_ROOT,') |
| 343 else | 343 else |
| 344 if [ ! -d "$NDK_DIR" ]; then | 344 if [ ! -d "$NDK_DIR" ]; then |
| 345 panic "Invalid directory: $NDK_DIR" | 345 panic "Invalid directory: $NDK_DIR" |
| 346 fi | 346 fi |
| 347 if [ ! -f "$NDK_DIR/ndk-build" ]; then | 347 if [ ! -f "$NDK_DIR/ndk-build" ]; then |
| 348 panic "Not a valid NDK directory: $NDK_DIR" | 348 panic "Not a valid NDK directory: $NDK_DIR" |
| 349 fi | 349 fi |
| 350 ANDROID_NDK_ROOT=$NDK_DIR | 350 ANDROID_NDK_ROOT=$NDK_DIR |
| 351 fi | 351 fi |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 | 1005 |
| 1006 if [ "$VERBOSE" -gt 0 ]; then | 1006 if [ "$VERBOSE" -gt 0 ]; then |
| 1007 echo "### START $COMMANDS" | 1007 echo "### START $COMMANDS" |
| 1008 cat $COMMANDS | 1008 cat $COMMANDS |
| 1009 echo "### END $COMMANDS" | 1009 echo "### END $COMMANDS" |
| 1010 fi | 1010 fi |
| 1011 | 1011 |
| 1012 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" | 1012 log "Launching gdb client: $GDB $GDB_ARGS -x $COMMANDS" |
| 1013 $GDB $GDB_ARGS -x $COMMANDS && | 1013 $GDB $GDB_ARGS -x $COMMANDS && |
| 1014 rm -f "$GDBSERVER_PIDFILE" | 1014 rm -f "$GDBSERVER_PIDFILE" |
| OLD | NEW |