Shlomi Fish reported:
2012-Aug-28:
I received the E-mail that my grant for improving the Perl debugger was accepted in the afternoon today ( 2012-Aug-28 ). My grant manager will be Alan Haggai Alavi, whom I talked with and successfully collaborated with in the past.
I decided to start working.
I checked the pending tests on my shlomif-perl-d-add-tests-take-2-may-git-burn-in-hell (titled so because git has given me some trouble in the past incarnation of the branch), and after merging the changesets from bleadperl, made sure all tests pass (by re-running
Configure,makeandmake test), and submitted a ticket with a patch with new tests:
Notes:
- To run the make in parallel do
make -j4(for 4 cores).- To run the tests in parallel do
make -j12 test_harness TEST_JOBS=4"(the-j12does not affect the tests, just makes sure the dependencies scanning goes quickly).make test_harness TEST_FILES='../lib/perl5db.t'tests only the debugger.Then I experimented with measuring coverage in the debugger. My first attempt was this script: https://gist.github.com/3583186
This caused some tests to fail. I decided not to investigate further for the time being (having spent a lot of time on it), and instead tried
Devel::Cover.
After experimenting with several ways to enable
Devel::Coverthe most promising way appeared to be adding ause Devel::Cover;statement to the top oflib/perl5db.pl.
This caused some of the tests to segfault in
lib/perl5db.t.I decided to stop investigating for now.
TODO : Report a bug in
Devel::Cover.I talked with a friend on IM and he suggested completely replacing
lib/perl5db.plwith eitherDevel::EbugorDevel::Trepan. I notedDevel::Trepanwas GPLv2+ + Artistic instead of GPLv1+ + Artistic like perl is, which may be problematic, and that its code exhibits some strange things such as prototypes for methods and multiple pragmas on the same lines, and that the author refused to apply a patch which remedied them (for his own reasons).It's also not completely compatible with
perl -d, which means a compatible interface should be written for it, and that adding tests against the current perl debugger with its current behaviour will help test that.2012-Aug-30:
I added a test for the
fdebugger command, by copying, pasting and modifying a previous test (for theb [filename]:[line]). It runs nicely.As I was testing the
/pattern/command I noticed it failed due to an exception. This turned out to have been caused by the fact that string eval inside the debugger did not handle lexical variables well. This was fixed along with a regression test and some future TODOs.I added a test for the
?pattern?command (to search backward), and this time the test worked immediately, though I'm not sure why the bug is not exhibited now. Maybe due to the previoususe vars (...).I sent an up-to-date patch on the previous bug report.
2012-Aug-31:
I fixed the older patch by removing an extraneous
$i++(only$iwas needed) that was reported in perl5-porters.Reverted some of the changes that invovled converting C-style
for(;;)loops intowhile/continueblocks.Submitted a new patch to the rt.perl.org ticket.
2012-Sep-01:
Plans for today:
Report the segfaults in
Devel::Cover.Add more tests.
Respond to this message by Rocky Bernstein:
- http://www.nntp.perl.org/group/perl.perl5.porters/2012/08/msg191414.html
- Done:
- TODO: include link.


Leave a comment