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

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

Issue 1806343003: Fix gdb debugging for the latest NDK release. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
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
(...skipping 16 matching lines...) Expand all
27 else 27 else
28 SYSTEM_LIBRARY_PATH=/system/lib 28 SYSTEM_LIBRARY_PATH=/system/lib
29 fi 29 fi
30 for library_file in \ 30 for library_file in \
31 libc.so \ 31 libc.so \
32 libc++.so \ 32 libc++.so \
33 libstdc++.so \ 33 libstdc++.so \
34 libm.so \ 34 libm.so \
35 liblog.so \ 35 liblog.so \
36 libz.so \ 36 libz.so \
37 libgccdemangle.so \
38 libsigchain.so \ 37 libsigchain.so \
39 libcutils.so \ 38 libcutils.so \
40 libunwind.so \ 39 libunwind.so \
41 libunwind-ptrace.so \
42 libbacktrace.so \ 40 libbacktrace.so \
43 libutils.so \ 41 libutils.so \
44 libstlport.so \
45 libGLES_trace.so \
46 libEGL.so \ 42 libEGL.so \
47 libGLESv2.so \ 43 libGLESv2.so \
48 ; do 44 ; do
49 ANDROID_LS=`$ADB $DEVICE_SERIAL shell ls -ld ${SYSTEM_LIBRARY_PATH}/${librar y_file}` 45 ANDROID_LS=`$ADB $DEVICE_SERIAL shell ls -ld ${SYSTEM_LIBRARY_PATH}/${librar y_file}`
50 if [ "${ANDROID_LS:0:1}" == "-" ]; then 46 if [ "${ANDROID_LS:0:1}" == "-" ]; then
51 adb_pull_if_needed "${SYSTEM_LIBRARY_PATH}/${library_file}" $GDB_TMP_DIR 47 adb_pull_if_needed "${SYSTEM_LIBRARY_PATH}/${library_file}" $GDB_TMP_DIR
52 fi 48 fi
53 done 49 done
54 50
55 if [[ $ANDROID_ARCH == *64* ]]; then 51 if [[ $ANDROID_ARCH == *64* ]]; then
(...skipping 13 matching lines...) Expand all
69 done 65 done
70 66
71 echo "Pushing gdbserver..." 67 echo "Pushing gdbserver..."
72 adb_push_if_needed $ANDROID_TOOLCHAIN/../gdbserver /data/local/tmp 68 adb_push_if_needed $ANDROID_TOOLCHAIN/../gdbserver /data/local/tmp
73 69
74 echo "Setting up port forward" 70 echo "Setting up port forward"
75 $ADB forward "tcp:5039" "tcp:5039" 71 $ADB forward "tcp:5039" "tcp:5039"
76 72
77 # Kill all previous instances of gdbserver and the app to rid all port overridin g errors. 73 # Kill all previous instances of gdbserver and the app to rid all port overridin g errors.
78 echo "Killing any running Skia processes." 74 echo "Killing any running Skia processes."
79 $ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill 75 set +e
80 $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill 76 $ADB shell ps | grep gdbserver | awk '{print $2}' | xargs $ADB shell kill 2> /de v/null
77 $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill 2> / dev/null
78 set -e
81 79
82 # Starting up gdbserver in android shell 80 # Starting up gdbserver in android shell
83 echo "Starting gdbserver with command: ${APP_ARGS[@]}" 81 echo "Starting gdbserver with command: ${APP_ARGS[@]}"
84 $ADB shell LD_LIBRARY_PATH=/data/local/tmp:\$LD_LIBRARY_PATH /data/local/tmp/gdb server :5039 /data/local/tmp/skia_launcher ${APP_ARGS[@]} & 82 $ADB shell LD_LIBRARY_PATH=/data/local/tmp:\$LD_LIBRARY_PATH /data/local/tmp/gdb server :5039 /data/local/tmp/skia_launcher ${APP_ARGS[@]} &
OLDNEW
« no previous file with comments | « platform_tools/android/bin/android_gdb_native ('k') | platform_tools/android/bin/android_setup.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698