aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/bin
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-01 15:34:28 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-01 15:34:28 +0000
commitc2d6a20ef826eddf5348a9dc61597815126f9393 (patch)
tree9069db18480d9322d271b1285c1d2d11b8c8b6cc /platform_tools/android/bin
parentae4976c9d09478975aac3a2956e9918d606fea46 (diff)
Improve Android gdbserver and gdb_ex scripts
- Don't complain if $GDB_TMP_DIR already exists - Since $GDB_TMP_DIR/gdb.setup might already exist, overwrite the file. NOTRY=true R=djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/266453006 git-svn-id: http://skia.googlecode.com/svn/trunk@14503 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools/android/bin')
-rwxr-xr-xplatform_tools/android/bin/android_gdb_exe22
-rwxr-xr-xplatform_tools/android/bin/android_gdbserver2
2 files changed, 14 insertions, 10 deletions
diff --git a/platform_tools/android/bin/android_gdb_exe b/platform_tools/android/bin/android_gdb_exe
index 920a16b38a..64be9bbd38 100755
--- a/platform_tools/android/bin/android_gdb_exe
+++ b/platform_tools/android/bin/android_gdb_exe
@@ -25,15 +25,19 @@ PORT=5039
# Set up gdb commands
GDBSETUP=$GDB_TMP_DIR/gdb.setup
-echo "file $GDB_TMP_DIR/skia_launcher" >> $GDBSETUP
-echo "target remote :$PORT" >> $GDBSETUP
-echo "set solib-absolute-prefix $GDB_TMP_DIR" >> $GDBSETUP
-echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP
-
-# The apps shared library symbols are not loaded by default so we load them here
-echo "break launch_app" >> $GDBSETUP
-echo "continue" >> $GDBSETUP
-echo "sharedLibrary $APP_NAME" >> $GDBSETUP
+{
+ echo "file ${GDB_TMP_DIR}/skia_launcher"
+ echo "target remote :${PORT}"
+ echo "set solib-absolute-prefix ${GDB_TMP_DIR}"
+ echo "set solib-search-path ${GDB_TMP_DIR}
+
+ # The apps shared library symbols are not loaded by default so we
+ # load them here."
+ echo "break launch_app"
+ echo "continue"
+ echo "sharedLibrary ${APP_NAME}"
+} > $GDBSETUP
+
# Launch gdb client
echo "Entering gdb client shell"
diff --git a/platform_tools/android/bin/android_gdbserver b/platform_tools/android/bin/android_gdbserver
index 3508c50c9b..837b97ae6f 100755
--- a/platform_tools/android/bin/android_gdbserver
+++ b/platform_tools/android/bin/android_gdbserver
@@ -19,7 +19,7 @@ fi
# We need the debug symbols from these files
GDB_TMP_DIR=$(pwd)/android_gdb_tmp
-mkdir $GDB_TMP_DIR
+mkdir -p $GDB_TMP_DIR
echo "Copying symbol files"
SYSTEM_LIBRARY_PATH=/system/lib