From: Clément DAVID Date: Tue, 21 May 2019 10:07:24 +0000 (+0200) Subject: Linux: add a debug option to launch Scilab under rr X-Git-Tag: 6.1.0~441 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=2ea33f118fbcc96414ca3d668b45c7e02c26cf0e Linux: add a debug option to launch Scilab under rr Change-Id: I806733b72c3ead0dee5b7f6190fe95b77d77c81b --- diff --git a/scilab/bin/scilab b/scilab/bin/scilab index aee08e9..5c2a5f0 100755 --- a/scilab/bin/scilab +++ b/scilab/bin/scilab @@ -81,6 +81,16 @@ start_debug() { fi } +start_debug_rr() { + if test -n "$DEVENV"; then + echo "Running debug of Scilab [rr] : " "$SCI"/libtool --mode=execute rr "$SCILABBIN" "$@" + "$SCI"/libtool --mode=execute rr "$SCILABBIN" "$@" + else + echo "Running debug of Scilab [rr] : " rr "$SCILABBIN" "$@" + rr record "$SCILABBIN" "$@" + fi +} + start_debug_kdbg() { if test -n "$DEVENV"; then echo "Running debug of Scilab [kdbg] : " "$SCI"/libtool --mode=execute kdbg "$SCILABBIN" @@ -1053,6 +1063,7 @@ do_help() echo "Developer arguments:" echo " -debug : Start Scilab under gdb (Unix/linux only)." echo " define the variable SCILAB_GDB_OPT to add custom arguments to gdb." + echo " -debug-rr : Start Scilab under rr (Unix/linux only)." echo " -debug-kdbg : Start Scilab under kdbg (Unix/linux only)." echo " -profiling : Start Scilab under valgrind (Unix/linux only)." echo " define the variable SCILAB_VALGRIND_OPT to add custom arguments to" @@ -1169,6 +1180,9 @@ if test "$rest" = "yes"; then -debug) DEBUG="-debug" ;; + -debug-rr) + DEBUG_RR="-debug-rr" + ;; -debug-kdbg) DEBUG_KDBG="-debug-kdbg" ;; @@ -1204,19 +1218,16 @@ if test "$rest" = "yes"; then if test -n "$DEBUG"; then start_debug "$@" $MORE_OPT + elif test -n "$DEBUG_RR"; then + start_debug_rr "$@" $MORE_OPT + elif test -n "$DEBUG_KDBG"; then + start_debug_kdbg "$@" $MORE_OPT + elif test -n "$PROFILING"; then + start_profiling "$@" $MORE_OPT + elif test -n "$PROFILING_VISU"; then + start_profiling_visu "$@" $MORE_OPT else - if test -n "$DEBUG_KDBG"; then - start_debug_kdbg "$@" $MORE_OPT - else - if test -n "$PROFILING"; then - start_profiling "$@" $MORE_OPT - else - if test -n "$PROFILING_VISU"; then - start_profiling_visu "$@" $MORE_OPT - else - do_scilex "$@" $MORE_OPT - fi # not profiling visu - fi # not profiling - fi # not debug kdbg - fi # not debug + do_scilex "$@" $MORE_OPT + fi # if $DEBUG + fi # if rest diff --git a/scilab/modules/core/help/en_US/scilab.xml b/scilab/modules/core/help/en_US/scilab.xml index 59ea522..dcf7175 100644 --- a/scilab/modules/core/help/en_US/scilab.xml +++ b/scilab/modules/core/help/en_US/scilab.xml @@ -319,6 +319,12 @@ evstr(a(i+2))*2 + -debug-rr + + Start Scilab under rr. + + + -debug-kdbg Start Scilab under kdbg. diff --git a/scilab/modules/core/help/fr_FR/scilab.xml b/scilab/modules/core/help/fr_FR/scilab.xml index 43d653a..9326245 100644 --- a/scilab/modules/core/help/fr_FR/scilab.xml +++ b/scilab/modules/core/help/fr_FR/scilab.xml @@ -357,6 +357,12 @@ evstr(a(i+2))*2 + -debug-rr + + Lance Scilab sous rr. + + + -debug-kdbg Lance Scilab sous kdbg. diff --git a/scilab/modules/core/help/ja_JP/scilab.xml b/scilab/modules/core/help/ja_JP/scilab.xml index a4fa08f..30acf69 100644 --- a/scilab/modules/core/help/ja_JP/scilab.xml +++ b/scilab/modules/core/help/ja_JP/scilab.xml @@ -324,6 +324,12 @@ evstr(a(i+2))*2 + -debug-rr + + rr上でScilabを開始します. + + + -debug-kdbg kdbg上でScilabを開始します. @@ -553,4 +559,4 @@ echo $? ]]> - \ No newline at end of file + diff --git a/scilab/modules/core/help/pt_BR/scilab.xml b/scilab/modules/core/help/pt_BR/scilab.xml index c36875f..e77878d 100644 --- a/scilab/modules/core/help/pt_BR/scilab.xml +++ b/scilab/modules/core/help/pt_BR/scilab.xml @@ -247,6 +247,12 @@ evstr(a(i+2))*2 + -debug-rr + + Start Scilab under rr. + + + -debug-kdbg Start Scilab under kdbg. diff --git a/scilab/modules/core/help/ru_RU/scilab.xml b/scilab/modules/core/help/ru_RU/scilab.xml index baf299f..ac0a7f9 100644 --- a/scilab/modules/core/help/ru_RU/scilab.xml +++ b/scilab/modules/core/help/ru_RU/scilab.xml @@ -334,6 +334,12 @@ evstr(a(i+2))*2 + -debug-rr + + Запуск Scilab'а в rr. + + + -debug-kdbg Запуск Scilab'а в kdbg.