echo "kernel/core_pattern = /tmp/core.%e.%p" >> /etc/sysctl.conf
sysctl -por
echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern
ulimit -c unlimited
./configure --without-optimizecpu --with-developer-flags sed -ie 's/-O2//g' Makefile make
and on segfault you will get a core dump in /tmp as in example /tmp/core.motion.24915./motion -n -d 9