Commit 78ae4f77 authored by Thomas Guillem's avatar Thomas Guillem

gdb: remove --apk-file option

Use ndk-stack instead

Example:
$ adb logcat | $ANDROID_NDK/ndk-stack -sym .dbg/armeabi-v7a/2.1.0
$ $ANDROID_NDK/ndk-stack -sym .dbg/armeabi-v7a/2.1.0 -dump crash.txt
parent dbd7e56c
......@@ -694,16 +694,10 @@ if [ "${HAVE_LIBCOMPAT}" = "1" ];then
fi
DBG_LIB_DIR=libvlc/jni/obj/local/${ANDROID_ABI}
OUT_LIB_DIR=libvlc/jni/libs/${ANDROID_ABI}
VERSION=$(grep "android:versionName" vlc-android/AndroidManifest.xml|cut -d\" -f 2)
OUT_DBG_DIR=.dbg/${ANDROID_ABI}/$VERSION
echo "Dumping dbg symbols info ${OUT_DBG_DIR}"
mkdir -p $OUT_DBG_DIR
for lib in ${DBG_LIB_DIR}/*.so; do
${CROSS_COMPILE}objcopy --only-keep-debug "$lib" "$OUT_DBG_DIR/`basename $lib.dbg`"; \
done
for lib in ${OUT_LIB_DIR}/*.so; do
${CROSS_COMPILE}objcopy --add-gnu-debuglink="$OUT_DBG_DIR/`basename $lib.dbg`" "$lib" ; \
done
cp -a ${DBG_LIB_DIR}/*.so ${OUT_DBG_DIR}
......@@ -10,7 +10,6 @@ while [ $# -gt 0 ]; do
case $1 in
help|--help|-h)
echo "Use -f to set the flavour. Default is vanillaARMv7."
echo "Use --apk-file <file.apk> [--dbg-file <file.so.dbg>] to debug an apk via a file containing the debugging info"
exit 0
;;
-f)
......@@ -20,14 +19,6 @@ while [ $# -gt 0 ]; do
-s)
NDK_GDB_ARGS="$NDK_GDB_ARGS --nowait --start"
;;
--apk-file)
APK_PATH=$2
shift
;;
--dbg-file)
DBGFILE_PATH=$2
shift
;;
esac
shift
done
......@@ -35,39 +26,6 @@ done
rm -rf "$TMP_PATH"
mkdir -p "$TMP_PATH"
if [ ! -z "$APK_PATH" ]; then
if [ ! -f "$APK_PATH" ];then
echo "invalid --apk"
exit 1
fi
aapt=$(ls -1 --sort=time $ANDROID_SDK/build-tools/*/aapt|head -n 1)
if [ -z "$aapt" ];then
echo "aapt not found in \$ANDROID_SDK"
exit 1
fi
arch=$($aapt l -a "$APK_PATH"|grep "libvlc.so"|cut -d"/" -f 2)
if [ -z "$DBGFILE_PATH" ];then
version=$($aapt l -a "$APK_PATH"|grep versionName|cut -d\" -f 2)
dbgfile_path="$SCRIPT_PATH/.dbg/$arch/$version/libvlc.so.dbg"
else
dbgfile_path="$DBGFILE_PATH"
fi
if [ ! -f "$dbgfile_path" ];then
echo "invalid --dbg-file"
exit 1
fi
echo ""
echo "\"list *0x<pc_address>\" to know where the specified apk crashed"
echo ""
${ANDROID_NDK}/prebuilt/linux-x86_64/bin/gdb "$dbgfile_path"
exit 0
fi
ANDROID_MANIFEST="$SCRIPT_PATH"/vlc-android/build/intermediates/manifests/full/$FLAVOUR/debug/AndroidManifest.xml
if [ ! -f "$ANDROID_MANIFEST" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment