blob: c2e803c38553e9de6e2c615431212489963ef1b0 [file]
This module replicates the functionality in Texinfo::ParserNonXS.
=====================================================================
Notes -
should be able to debug with gdb. Add
./configure PERL_EXT_CFLAGS='-g -O0'
For individual tests can do "gdb perl" in ../../perl followed by e.g.
(gdb) r -w t/27float.t comment_space_comand_in_float
After a single run can set breakpoints.
How to debug with valgrind -
export PERL5LIB to the value in the makeinfo script
with alias VAL='valgrind --log-file=val.log', can do from the doc directory e.g.
VAL perl ../tta/perl/texi2any.pl texinfo.texi
also
valgrind --vgdb-error=0 perl ../tta/perl/texi2any.pl texinfo.texi
=====================================================================
To see contents of leaked memory
Run with valgrind, in the ../../perl directory e.g.
valgrind --leak-check=full --vgdb-error=0 --vgdb-stop-at=exit \
perl -w t/18itemize.t
at end of run, in gdb:
(gdb) monitor leak_check definiteleak any
==10409== 480 (80 direct, 400 indirect) bytes in 1 blocks are definitely lost in loss record 3,261 of 4,374
...
(gbd) monitor block_list 3261
Get log files specific to tests with
$ grep '^\['\' t/18itemize.t | sed -e 's/^..//' -e 's/..$//' >test-list
$ for t in `cat test-list` ; do valgrind --log-file=val.log.$t \
--leak-check=full perl -w t/18itemize.t $t ; done
%
checking memory leaks
install Perl::Destruct::Level via cpan
then e.g.
VAL --leak-check=full perl -M'Perl::Destruct::Level level => 1' -w t/02coverage.t