Commit 81890c1c authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CHANGE #86] bring gdb automation script up to date

parent 1fa09401
#!/bin/sh
# get the current directory
PWD=`pwd`
# get path of this script
BINDIR=`dirname "$0"`
PARAM_FILENAME="/tmp/walnut-gdb.script."$(date +%s)
echo $PARAM_FILENAME
echo run $@ > $PARAM_FILENAME
......@@ -14,8 +8,29 @@ echo run $@ > $PARAM_FILENAME
# go there to ensure walnuts working directory is set correctly
cd "$BINDIR"
# get path of this script
BINDIR=`dirname "$0"`
cd "$BINDIR/.."
# We want to avoid that multiple system installations of OpenWalnut cause some weird loading of libs. We want ours (relative to our executable) to be loaded:
Libs="libopenwalnut_biosig.so.1 libopenwalnut_eep.so.1 libopenwalnut_niftiio.so.1 libopenwalnut_niftiznz.so.1"
# Well, this one needs to be there! If not, your installation is wrong.
Preloads="lib/libopenwalnut.so.1"
# We need to ensure the libs are there. If not, do not add them to the preloads variable
for lib in $Libs
do
if [ -e "lib/$lib" ]; then
Preloads=$Preloads:lib/$lib
fi
done
# Finally, export it
export LD_PRELOAD=$Preloads
# Force C locale. This fixes an issue with newer boost versions. See ticket #130.
export LC_ALL=C
# run walnut
gdb ./openwalnut-qt4 -cd=$PWD -command=$PARAM_FILENAME
gdb bin/openwalnut-qt4 -command=$PARAM_FILENAME
rm $PARAM_FILENAME
cd $PWD
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment