Ability to run browsers trought gdb with -g option
authorArnaud Renevier <a.renevier@samsung.com>
Tue, 24 Feb 2015 23:16:33 +0000 (15:16 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
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 <a.renevier@samsung.com>
tizen_src/ewk/efl_webview_app/efl_webview_app.sh
tizen_src/ewk/ubrowser/ubrowser.sh

index 1b06c1a..4a4e8d5 100755 (executable)
@@ -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
index 2373a8d..407ea16 100755 (executable)
@@ -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