[Android] [PATCH] add gdb.sh: helper to run ndk-gdb

Jean-Baptiste Kempf jb at videolan.org
Thu Feb 12 17:32:22 CET 2015


OK.

On 12 Feb, Thomas Guillem wrote :
> ---
>  gdb.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100755 gdb.sh
> 
> diff --git a/gdb.sh b/gdb.sh
> new file mode 100755
> index 0000000..9569de0
> --- /dev/null
> +++ b/gdb.sh
> @@ -0,0 +1,45 @@
> +#!/bin/sh
> +
> +SCRIPT_PATH=$(dirname $0)
> +TMP_PATH="$SCRIPT_PATH"/.gdb
> +
> +FLAVOUR=vanillaARMv7
> +NDK_GDB_ARGS="--force"
> +
> +while [ $# -gt 0 ]; do
> +    case $1 in
> +        help|--help|-h)
> +            echo "Use -f to set the flavour. Default is vanillaARMv7."
> +            exit 0
> +            ;;
> +        -f)
> +            FLAVOUR=$2
> +            shift
> +            ;;
> +        -s)
> +            NDK_GDB_ARGS="$NDK_GDB_ARGS --nowait --start"
> +            ;;
> +    esac
> +    shift
> +done
> +
> +ANDROID_MANIFEST="$SCRIPT_PATH"/vlc-android/build/intermediates/manifests/full/$FLAVOUR/debug/AndroidManifest.xml
> +
> +if [ ! -f "$ANDROID_MANIFEST" ]; then
> +    echo "invalid flavour, did you try building first for this flavour ?"
> +    exit 1
> +fi
> +
> +rm -rf "$TMP_PATH"
> +mkdir -p "$TMP_PATH"/jni
> +
> +cp -r "$SCRIPT_PATH"/libvlc/jni/libs "$TMP_PATH"
> +cp -r "$SCRIPT_PATH"/libvlc/jni/obj "$TMP_PATH"/jni
> +
> +cp "$SCRIPT_PATH"/libvlc/jni/Android.mk "$TMP_PATH"/jni
> +echo "APP_ABI := all" > "$TMP_PATH"/jni/Application.mk
> +
> +cp "$ANDROID_MANIFEST" "$TMP_PATH"
> +
> +(cd "$TMP_PATH" && bash $ANDROID_NDK/ndk-gdb $NDK_GDB_ARGS)
> +#(cd "$TMP_PATH" && bash $ANDROID_NDK/ndk-gdb-py $NDK_GDB_ARGS)
> -- 
> 2.1.3
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list