Tags
There are no tags for this page.
Attachments
Perl 6
SMOP Debugging
Debugging a libtool package is not that straight forward because of the libtool scripts, which gdb doesn't like at all.
First thing, you need to get a debug-friendly compilation, to get that you need to do:
- CFLAGS='-O0 -g3' ./configure && make clean check
Then, to debug, let's say test/01_smop_lowlevel.t, you must:
- LD_LIBRARY_PATH=src/.libs/ gdb test/.libs/01_smop_lowlevel.t
This is needed because libtool puts the actual binaries in a .libs directory, and gdb is not happy debugging the script libtool places in the place of the executable.
If you want to run valgrind to check for memory leaks not reported by the SMOP_LOWLEVEL_MEM_TRACE, you can just
- LD_LIBRARY_PATH=src/.libs valgrind --tool=memcheck --leak-check=full --show-reachable=yes ./test/.libs/08_native_uint.t
See also SMOP Hacking
|