diff --git a/tools/iocsh.bash b/tools/iocsh.bash index 1f268e3c692f090e4dc8101161a7874142fd0137..8ff7554079a15f31fb951b010ceff8a59581e0aa 100755 --- a/tools/iocsh.bash +++ b/tools/iocsh.bash @@ -121,15 +121,12 @@ ulimit -c unlimited if [ "$REALTIME" == "RT" ]; then export LD_BIND_NOW=1; - __CHRT__="chrt --fifo 1 "; printf "## \n"; printf "## Better support for Real-Time IOC Application.\n" printf "## Now we set 'export LD_BIND_NOW=%s'\n" "$LD_BIND_NOW"; printf "## If one may meet the 'Operation not permitted' message, \n"; printf "## please run %s without the real-time option\n" "$SC_SCRIPTNAME"; printf "##\n"; -else - __CHRT__=""; fi if [[ ${BASECODE} -ge 07000101 ]]; then @@ -140,5 +137,5 @@ fi # # -${__CHRT__}${EPICS_BASE}/bin/${EPICS_HOST_ARCH}/softIoc${__PVA__} -D ${EPICS_BASE}/dbd/softIoc${__PVA__}.dbd "${IOC_STARTUP}" 2>&1 +${__LOADER__}${EPICS_BASE}/bin/${EPICS_HOST_ARCH}/softIoc${__PVA__} -D ${EPICS_BASE}/dbd/softIoc${__PVA__}.dbd "${IOC_STARTUP}" 2>&1 diff --git a/tools/iocsh_functions b/tools/iocsh_functions index 22931839d6c34b9f60097e17ad2bd262187cc053..3184bde0431ea09eee66aa31764ce18842ead99a 100644 --- a/tools/iocsh_functions +++ b/tools/iocsh_functions @@ -28,6 +28,7 @@ E_NOTROOT=101 EXIST=1 NON_EXIST=0 REALTIME= +__LOADER__= function pushd { builtin pushd "$@" > /dev/null; } function popd { builtin popd "$@" > /dev/null; } @@ -384,6 +385,7 @@ function loadFiles ;; ( -rt | -RT | -realtime | --realtime ) REALTIME="RT" + __LOADER__="chrt --fifo 1 " ;; ( @* ) loadFiles $(cat ${file#@}) @@ -422,6 +424,14 @@ function loadFiles shift printf "epicsEnvSet EPICS_DRIVER_PATH %s:${EPICS_DRIVER_PATH}\n", $1 ;; + ( -dg ) + shift + __LOADER__="gdb --eval-command run --args " + ;; + ( -dv ) + shift + __LOADER__="valgrind --leak-check=full " + ;; ( -* ) printf "Unknown option $1\n\n" >&2 help