OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # android_gdbserver: Pushes gdbserver. Starts debugging environment. | 3 # android_gdbserver: Pushes gdbserver. Starts debugging environment. |
4 | 4 |
5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
6 source $SCRIPT_DIR/android_setup.sh | 6 source $SCRIPT_DIR/android_setup.sh |
7 source $SCRIPT_DIR/utils/setup_adb.sh | 7 source $SCRIPT_DIR/utils/setup_adb.sh |
8 | 8 |
9 APP_NAME=${APP_ARGS[0]} | 9 APP_NAME=${APP_ARGS[0]} |
10 PORT=5039 | 10 PORT=5039 |
(...skipping 11 matching lines...) Expand all Loading... |
22 mkdir -p $GDB_TMP_DIR | 22 mkdir -p $GDB_TMP_DIR |
23 | 23 |
24 echo "Copying symbol files" | 24 echo "Copying symbol files" |
25 SYSTEM_LIBRARY_PATH=/system/lib | 25 SYSTEM_LIBRARY_PATH=/system/lib |
26 for library_file in \ | 26 for library_file in \ |
27 libc.so \ | 27 libc.so \ |
28 libstdc++.so \ | 28 libstdc++.so \ |
29 libm.so \ | 29 libm.so \ |
30 liblog.so \ | 30 liblog.so \ |
31 libz.so \ | 31 libz.so \ |
32 libcutils.so \ | |
33 libgccdemangle.so \ | 32 libgccdemangle.so \ |
34 libcorkscrew.so \ | 33 libcorkscrew.so \ |
35 libutils.so \ | 34 libutils.so \ |
36 libstlport.so \ | 35 libstlport.so \ |
37 libGLES_trace.so \ | 36 libGLES_trace.so \ |
38 libEGL.so \ | 37 libEGL.so \ |
39 libGLESv2.so \ | 38 libGLESv2.so \ |
40 ; do | 39 ; do |
41 adb_pull_if_needed "${SYSTEM_LIBRARY_PATH}/${library_file}" $GDB_TMP_DIR | 40 adb_pull_if_needed "${SYSTEM_LIBRARY_PATH}/${library_file}" $GDB_TMP_DIR |
42 done | 41 done |
(...skipping 16 matching lines...) Expand all Loading... |
59 echo "Setting up port forward" | 58 echo "Setting up port forward" |
60 $ADB forward "tcp:5039" "tcp:5039" | 59 $ADB forward "tcp:5039" "tcp:5039" |
61 | 60 |
62 # Kill all previous instances of gdbserver and the app to rid all port overridin
g errors. | 61 # Kill all previous instances of gdbserver and the app to rid all port overridin
g errors. |
63 echo "Killing any running Skia processes." | 62 echo "Killing any running Skia processes." |
64 $ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill | 63 $ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill |
65 $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill | 64 $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill |
66 | 65 |
67 # Starting up gdbserver in android shell | 66 # Starting up gdbserver in android shell |
68 echo "Starting gdbserver with command: ${APP_ARGS[@]}" | 67 echo "Starting gdbserver with command: ${APP_ARGS[@]}" |
69 $ADB shell /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_A
RGS[@]} & | 68 $ADB shell /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_A
RGS[@]} & |
OLD | NEW |