Make gdb work for 64-bit Skia

BUG=skia:
R=djsollen@google.com

Author: qiankun.miao@intel.com

Review URL: https://codereview.chromium.org/398733002
This commit is contained in:
qiankun.miao 2014-07-16 13:21:15 -07:00 committed by Commit bot
parent dddf564ee7
commit d75547925d
2 changed files with 11 additions and 4 deletions

View File

@ -29,13 +29,16 @@ GDBSETUP=$GDB_TMP_DIR/gdb.setup
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}
echo "set solib-search-path ${GDB_TMP_DIR}"
# The apps shared library symbols are not loaded by default so we
# load them here."
# load them here.
echo "break launch_app"
echo "continue"
echo "sharedLibrary ${APP_NAME}"
# Load libskia_android.so here.
echo "sharedLibrary skia_android"
} > $GDBSETUP

View File

@ -22,7 +22,11 @@ GDB_TMP_DIR=$(pwd)/android_gdb_tmp
mkdir -p $GDB_TMP_DIR
echo "Copying symbol files"
SYSTEM_LIBRARY_PATH=/system/lib
if [[ $ANDROID_ARCH == *64* ]]; then
SYSTEM_LIBRARY_PATH=/system/lib64
else
SYSTEM_LIBRARY_PATH=/system/lib
fi
for library_file in \
libc.so \
libstdc++.so \
@ -65,4 +69,4 @@ $ADB shell ps | grep ${APP_NAME} | awk '{print $2}' | xargs $ADB shell kill
# Starting up gdbserver in android shell
echo "Starting gdbserver with command: ${APP_ARGS[@]}"
$ADB shell /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_ARGS[@]} &
$ADB shell LD_LIBRARY_PATH=/data/local/tmp:\$LD_LIBRARY_PATH /data/local/tmp/gdbserver :5039 /data/local/tmp/skia_launcher ${APP_ARGS[@]} &