develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH 5.7.2] debugging selfloaded stuff

From:
Ilya Zakharevich
Date:
July 23, 2001 15:07
Subject:
[PATCH 5.7.2] debugging selfloaded stuff
Message ID:
20010723180740.A13960@math.ohio-state.edu
Debugging self-loaded stuff did not work.  Perl kept the debugging
info of evals which introduced new code - so that you could debug
subroutines defined inside evals.  Unfortunately, for

  eval 'sub f()';	   # 1
  eval 'sub f() {123}';	   # 2

Perl thought that f was introduced in "1", and not in "2".  And
SelfLoader was doing approximately this...

Enjoy,
Ilya

--- ./op.c-pre-debug	Thu Jun 21 06:07:50 2001
+++ ./op.c	Sun Jul 22 13:59:28 2001
@@ -4722,6 +4722,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, 
 	}
 	/* ... before we throw it away */
 	SvREFCNT_dec(PL_compcv);
+	if (PERLDB_INTER)	/* Advice debugger on the new sub. */
+	    ++PL_sub_generation;
     }
     else {
 	cv = PL_compcv;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About