Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: platform_tools/android/bin/android_gdbserver

Issue 266453006: Improve Android gdbserver and gdb_ex scripts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « platform_tools/android/bin/android_gdb_exe ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 11
12 BUILD_DIR="${SKIA_OUT}/${BUILDTYPE}" 12 BUILD_DIR="${SKIA_OUT}/${BUILDTYPE}"
13 TARGET_LIBRARY="${BUILD_DIR}/lib/lib${APP_NAME}.so" 13 TARGET_LIBRARY="${BUILD_DIR}/lib/lib${APP_NAME}.so"
14 if [ ! -f "$TARGET_LIBRARY" ] 14 if [ ! -f "$TARGET_LIBRARY" ]
15 then 15 then
16 echo "Unable to find the ${APP_NAME} library at ${TARGET_LIBRARY}." 16 echo "Unable to find the ${APP_NAME} library at ${TARGET_LIBRARY}."
17 exit 1 17 exit 1
18 fi 18 fi
19 19
20 # We need the debug symbols from these files 20 # We need the debug symbols from these files
21 GDB_TMP_DIR=$(pwd)/android_gdb_tmp 21 GDB_TMP_DIR=$(pwd)/android_gdb_tmp
22 mkdir $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 \ 32 libcutils.so \
(...skipping 27 matching lines...) Expand all
60 $ADB forward "tcp:5039" "tcp:5039" 60 $ADB forward "tcp:5039" "tcp:5039"
61 61
62 # Kill all previous instances of gdbserver and the app to rid all port overridin g errors. 62 # Kill all previous instances of gdbserver and the app to rid all port overridin g errors.
63 echo "Killing any running Skia processes." 63 echo "Killing any running Skia processes."
64 $ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill 64 $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 65 $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill
66 66
67 # Starting up gdbserver in android shell 67 # Starting up gdbserver in android shell
68 echo "Starting gdbserver with command: ${APP_ARGS[@]}" 68 echo "Starting gdbserver with command: ${APP_ARGS[@]}"
69 $ADB shell /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_A RGS[@]} & 69 $ADB shell /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_A RGS[@]} &
OLDNEW
« no previous file with comments | « platform_tools/android/bin/android_gdb_exe ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698