[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

debugger saved lines regression



5.10 has a regression. It must be obscure, because I've seen no comment about
it before. Specifically, it no longer saves the source lines of an eval
statement under the debugger.

$ cat breaker.pl 
#!perl -w

eval '
sub foo {
  $DB::single = 1;
  print "Hello from foo!\n";
  # Comment
  print "Goodbye from foo!\n";
}
';

foo();



5.8.8, and blead at the revision before the regression:

$ ./perl -Ilib -d breaker.pl 

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(breaker.pl:3):   eval '
main::(breaker.pl:4):   sub foo {
main::(breaker.pl:5):     $DB::single = 1;
main::(breaker.pl:6):     print "Hello from foo!\n";
  DB<1> s
main::(breaker.pl:12):  foo();
  DB<1> s
main::foo((eval 7)[breaker.pl:3]:3):
3:        $DB::single = 1;
  DB<1> s
main::foo((eval 7)[breaker.pl:3]:4):
4:        print "Hello from foo!\n";
  DB<1> s
Hello from foo!
main::foo((eval 7)[breaker.pl:3]:6):
6:        print "Goodbye from foo!\n";
  DB<1> s
Goodbye from foo!
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.  
  DB<1> q


5.10.0, and blead at the revision of the regression:

$ ./perl -Ilib -d breaker.pl 

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(breaker.pl:3):   eval '
main::(breaker.pl:4):   sub foo {
main::(breaker.pl:5):     $DB::single = 1;
main::(breaker.pl:6):     print "Hello from foo!\n";
  DB<1> c
main::foo((eval 7)[breaker.pl:3]:4):
4:
  DB<1> s
Hello from foo!
main::foo((eval 7)[breaker.pl:3]:6):
6:
  DB<1> s
Goodbye from foo!
Debugged program terminated.  Use q to quit or R to restart,
  use o inhibit_exit to avoid stopping after program termination,
  h q, h R or h o to get additional info.  
  DB<1> q



The lines are initially saved. It's just that the AV they're in is getting
released at the end of the eval scope. And the culprit?

Change 30980 by rgs@stcosmo on 2007/04/19 14:48:20

	Subject: Re: new C3 MRO patch
	From: "Brandon Black" <blblack@gmail.com>
	Date: Tue, 17 Apr 2007 13:14:36 -0500
	Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com>


http://public.activestate.com/cgi-bin/perlbrowse/p/30980

[although you need add change 30984 to mro.c to get it to compile, threads or
not]


I have no idea why. Anyone feel up to having a look?

Attached is a regression test that will pass once this is fixed.

Nicholas Clark

retainedlines.t


Follow-Ups from:
Peter Scott <Peter@PSDT.com>
Nicholas Clark <nick@ccl4.org>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]