OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # android_gdb_native: Pushes gdbserver, connects to specified Skia app, | 3 # android_gdb_native: Pushes gdbserver, connects to specified Skia app, |
4 # and enters command line debugging environment. | 4 # and enters command line debugging environment. |
5 | 5 |
6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
7 source $SCRIPT_DIR/android_setup.sh | 7 source $SCRIPT_DIR/android_setup.sh |
8 | 8 |
9 # setup the gdbserver | 9 # setup the gdbserver |
10 export BUILDTYPE # from android_setup.sh | 10 export BUILDTYPE # from android_setup.sh |
(...skipping 27 matching lines...) Expand all Loading... |
38 echo "continue" | 38 echo "continue" |
39 echo "sharedLibrary ${APP_NAME}" | 39 echo "sharedLibrary ${APP_NAME}" |
40 | 40 |
41 # Load libskia_android.so here. | 41 # Load libskia_android.so here. |
42 echo "sharedLibrary skia_android" | 42 echo "sharedLibrary skia_android" |
43 } > $GDBSETUP | 43 } > $GDBSETUP |
44 | 44 |
45 | 45 |
46 # Launch gdb client | 46 # Launch gdb client |
47 echo "Entering gdb client shell" | 47 echo "Entering gdb client shell" |
48 GDB_COMMAND=$(command ls "$ANDROID_TOOLCHAIN"/*-gdb | head -n1) | 48 $ANDROID_TOOLCHAIN/../gdb -x $GDBSETUP |
49 "$GDB_COMMAND" -x $GDBSETUP | |
50 | 49 |
51 # Clean up: | 50 # Clean up: |
52 # We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging | 51 # We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging |
53 # sessions to take longer than necessary. The tradeoff is to now force the user | 52 # sessions to take longer than necessary. The tradeoff is to now force the user |
54 # to remove the directory when they are done debugging. | 53 # to remove the directory when they are done debugging. |
55 rm $GDBSETUP | 54 rm $GDBSETUP |
OLD | NEW |