Skip to content
Snippets Groups Projects
Commit 77b36feb authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Add option for running with gdb

parent 17d10247
No related branches found
No related tags found
No related merge requests found
......@@ -22,10 +22,10 @@ fi
if [ -n "${NXSESSIONID}" ]; then
command -v vglrun >/dev/null 2>&1 || { echo >&2 "MantidPlot requires VirtualGL but it's not installed. Aborting."; exit 1; }
VGLRUN="vglrun "
VGLRUN="vglrun"
elif [ -n "${TLSESSIONDATA}" ]; then
command -v vglrun >/dev/null 2>&1 || { echo >&2 "MantidPlot requires VirtualGL but it's not installed. Aborting."; exit 1; }
VGLRUN="vglrun "
VGLRUN="vglrun"
fi
# Define when to report large memory allocation
......@@ -42,8 +42,15 @@ else
TCM_REPORT=${TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD}
fi
# run with gdb THIS OPTION MUST BE SUPPLIED FIRST
if [ -n "$1" ] && [ "$1" = "--debug" ]; then
shift
GDB="gdb --args"
fi
# Launch
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} \
TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD=${TCM_REPORT} \
LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt \
@WRAPPER_PREFIX@$VGLRUN$INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@
@WRAPPER_PREFIX@$VGLRUN $GDB $INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment