Shlomi Fish reported:
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
make test), and submitted a ticket with a patch with new tests:
- 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
After experimenting with several ways to enable
Devel::Coverthe most promising way appeared to be adding a
use Devel::Cover;statement to the top of
This caused some of the tests to segfault in
I decided to stop investigating for now.
TODO : Report a bug in
I talked with a friend on IM and he suggested completely replacing
Devel::Trepan. I noted
Devel::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.
I added a test for the
fdebugger command, by copying, pasting and modifying a previous test (for the
b [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 previous
use vars (...).
I sent an up-to-date patch on the previous bug report.
I fixed the older patch by removing an extraneous
$iwas needed) that was reported in perl5-porters.
Reverted some of the changes that invovled converting C-style
Submitted a new patch to the rt.perl.org ticket.
Plans for today:
Report the segfaults in
Add more tests.
Respond to this message by Rocky Bernstein:
- TODO: include link.