| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # | 2 # |
| 3 # android_gdb: Pushes gdbserver. Connects and enters debugging environment. | 3 # android_gdb: Pushes gdbserver. Connects and enters debugging environment. |
| 4 | 4 |
| 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 6 | 6 |
| 7 # setup the gdbserver | 7 # setup the gdbserver |
| 8 $SCRIPT_DIR/android_gdbserver $@ | 8 $SCRIPT_DIR/android_gdbserver $@ |
| 9 | 9 |
| 10 # quit if gdbserver setup failed | 10 # quit if gdbserver setup failed |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 PORT=5039 | 22 PORT=5039 |
| 23 | 23 |
| 24 # Set up gdb commands | 24 # Set up gdb commands |
| 25 GDBSETUP=$GDB_TMP_DIR/gdb.setup | 25 GDBSETUP=$GDB_TMP_DIR/gdb.setup |
| 26 echo "file $GDB_TMP_DIR/skia_launcher" >> $GDBSETUP | 26 echo "file $GDB_TMP_DIR/skia_launcher" >> $GDBSETUP |
| 27 echo "target remote :$PORT" >> $GDBSETUP | 27 echo "target remote :$PORT" >> $GDBSETUP |
| 28 echo "set solib-absolute-prefix $GDB_TMP_DIR" >> $GDBSETUP | 28 echo "set solib-absolute-prefix $GDB_TMP_DIR" >> $GDBSETUP |
| 29 echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP | 29 echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP |
| 30 | 30 |
| 31 # The apps shared library symbols are not loaded by default so we load them here | 31 # The apps shared library symbols are not loaded by default so we load them here |
| 32 echo "break skia_launcher.cpp:launch_app" >> $GDBSETUP | 32 echo "break launch_app" >> $GDBSETUP |
| 33 echo "continue" >> $GDBSETUP | 33 echo "continue" >> $GDBSETUP |
| 34 echo "sharedLibrary $APP_NAME" >> $GDBSETUP | 34 echo "sharedLibrary $APP_NAME" >> $GDBSETUP |
| 35 | 35 |
| 36 source $SCRIPT_DIR/android_setup.sh | 36 source $SCRIPT_DIR/android_setup.sh |
| 37 | 37 |
| 38 # Launch gdb client | 38 # Launch gdb client |
| 39 echo "Entering gdb client shell" | 39 echo "Entering gdb client shell" |
| 40 $ANDROID_TOOLCHAIN/arm-linux-androideabi-gdb -x $GDBSETUP | 40 $ANDROID_TOOLCHAIN/arm-linux-androideabi-gdb -x $GDBSETUP |
| 41 | 41 |
| 42 # Clean up | 42 # Clean up |
| 43 rm -rf $GDB_TMP_DIR | 43 rm -rf $GDB_TMP_DIR |
| OLD | NEW |