#! /bin/bash
export LD_LIBRARY_PATH=`pwd`

#Add dummy lib in case we don't find it, e.g. there is no OFED installed  
if ldd _t-rex-64  | grep "libibverbs.so" | grep -q "not found"; then 
export LD_LIBRARY_PATH=$PWD:$PWD/dumy_libs                           
fi
            

/usr/bin/gdb --args ./_t-rex-64-debug $@