From: Arnaud Renevier Date: Tue, 24 Feb 2015 23:16:33 +0000 (-0800) Subject: Ability to run browsers trought gdb with -g option X-Git-Tag: submit/tizen/20201118.160233~1172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b5622bec18fff8a41b87f6b32c9d0250de4ac09;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Ability to run browsers trought gdb with -g option Right now, it is not easy to run ubrowser or efl_webview_app with gdb. This patch adds a -g option to both wrappers scripts. If they are called with that option, the applications are launched with gdb. Reviewed by: Piotr Tworek, SeungSeop Park Change-Id: Icb504e12b8c286f13164ecbe41915e2e261ff07d Signed-off-by: Arnaud Renevier --- diff --git a/tizen_src/ewk/efl_webview_app/efl_webview_app.sh b/tizen_src/ewk/efl_webview_app/efl_webview_app.sh index 1b06c1a..4a4e8d5 100755 --- a/tizen_src/ewk/efl_webview_app/efl_webview_app.sh +++ b/tizen_src/ewk/efl_webview_app/efl_webview_app.sh @@ -29,4 +29,21 @@ echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" # Allow chromium-efl to work with llvmpipe or softpipe mesa backends export EVAS_GL_NO_BLACKLIST=1 -exec ${SCRIPTDIR}/efl_webview_app "$@" +debug=0 +while [ $# -gt 0 ]; do + case "$1" in + -g | --debug ) + debug=1 + shift + ;; + * ) + break + ;; + esac +done + +if [ $debug -eq 1 ] ; then + exec gdb --args ${SCRIPTDIR}/efl_webview_app "$@" +else + exec ${SCRIPTDIR}/efl_webview_app "$@" +fi diff --git a/tizen_src/ewk/ubrowser/ubrowser.sh b/tizen_src/ewk/ubrowser/ubrowser.sh index 2373a8d..407ea16 100755 --- a/tizen_src/ewk/ubrowser/ubrowser.sh +++ b/tizen_src/ewk/ubrowser/ubrowser.sh @@ -21,4 +21,21 @@ CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$(cd $SCRIPTDIR/../Dependencies/Root/$_LIBDIR; export LD_LIBRARY_PATH=$CHROMIUM_EFL_DEPENDENCIES_LIBDIR:$CHROMIUM_EFL_LIBDIR:${LD_LIBRARY_PATH} echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" -exec ${SCRIPTDIR}/ubrowser "$@" +debug=0 +while [ $# -gt 0 ]; do + case "$1" in + -g | --debug ) + debug=1 + shift + ;; + * ) + break + ;; + esac +done + +if [ $debug -eq 1 ] ; then + exec gdb --args ${SCRIPTDIR}/ubrowser "$@" +else + exec ${SCRIPTDIR}/ubrowser "$@" +fi