aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/bin/android_gdb_native
diff options
context:
space:
mode:
authorGravatar Derek Sollenberger <djsollen@google.com>2016-12-01 14:37:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-02 14:11:24 +0000
commit78b35230aaa2620f826266e3f2385bf06eb881ed (patch)
tree28104f2dff9cf0eaa2e8987b45269f6157c6e150 /platform_tools/android/bin/android_gdb_native
parent9c77ea1ea5a1fa26f10d3bf83a6250008af78049 (diff)
Archive or update unsupported Android scripts and third-party dependencies.
- nothing uses ashmem; - cpufeatures and native_app_glue are now pulled from the NDK; - no bots use the scripts in platform_tools/android/bin; - update scripts to work with GN instead of GYP. Change-Id: I14f47eeadb3047505e232dd10385f58ef12c73f4 Reviewed-on: https://skia-review.googlesource.com/5422 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Derek Sollenberger <djsollen@google.com>
Diffstat (limited to 'platform_tools/android/bin/android_gdb_native')
-rwxr-xr-xplatform_tools/android/bin/android_gdb_native25
1 files changed, 14 insertions, 11 deletions
diff --git a/platform_tools/android/bin/android_gdb_native b/platform_tools/android/bin/android_gdb_native
index c114a3d309..da513cbf79 100755
--- a/platform_tools/android/bin/android_gdb_native
+++ b/platform_tools/android/bin/android_gdb_native
@@ -4,10 +4,9 @@
# and enters command line debugging environment.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-source $SCRIPT_DIR/android_setup.sh
+source $SCRIPT_DIR/utils/android_setup.sh
# setup the gdbserver
-export BUILDTYPE # from android_setup.sh
$SCRIPT_DIR/android_gdbserver -d ${DEVICE_ID} ${APP_ARGS[@]}
# quit if gdbserver setup failed
@@ -27,25 +26,29 @@ PORT=5039
# Set up gdb commands
GDBSETUP=$GDB_TMP_DIR/gdb.setup
{
- echo "file ${GDB_TMP_DIR}/skia_launcher"
+ echo "file ${GDB_TMP_DIR}/${APP_NAME}"
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 "break main"
echo "continue"
- echo "sharedLibrary ${APP_NAME}"
-
- # Load libskia_android.so here.
- echo "sharedLibrary skia_android"
} > $GDBSETUP
# Launch gdb client
+HOST=`uname | tr '[A-Z]' '[a-z]'`
+if [ $HOST == "darwin" ]; then
+ GDB_HOST=$ANDROID_NDK_ROOT/prebuilt/darwin-x86_64/bin/gdb
+elif [ $HOST == "linux" ]; then
+ GDB_HOST=$ANDROID_NDK_ROOT/prebuilt/linux-x86_64/bin/gdb
+else
+ echo "Could not automatically determine OS!"
+ exit 1;
+fi
+
echo "Entering gdb client shell"
-$ANDROID_TOOLCHAIN/host_prebuilt/bin/gdb -x $GDBSETUP
+$GDB_HOST -x $GDBSETUP
# Clean up:
# We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging