Skip to content

dev DEBUG tools

Olivier Guyon edited this page Oct 17, 2021 · 3 revisions

Running milk in debug mode

Most errors can be tracked by running milk in debug mode.

Compile with the Debug option :

cmake -DCMAKE_BUILD_TYPE=Debug ..

Using a debugger

The standard tool is gdb (GNU Debugger) : https://www.gnu.org/software/gdb/

Using memcheck

OPTION="--leak-check=full --show-leak-kinds=all"
OPTION="$OPTION --track-origins=yes"
OPTION="$OPTION --num-callers=200"
OPTION="$OPTION --show-reachable=yes"
#OPTION="$OPTION --gen-suppressions=all"
OPTION="$OPTION --log-file=milk.memcheck.log"
OPTION="$OPTION --suppressions=$MILK_ROOT/milk.memcheck.supp"
OPTION="$OPTION --max-stackframe=4442392"

valgrind ${OPTION} ./milk

Clone this wiki locally