From: Mike Guy Date: Tue, 8 Aug 2000 21:54:29 +0000 (+0100) Subject: debugger "d" command doesnt check line number X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbdae7b29367ab5f4679c8f66f10c445d0daa657;p=p5sagit%2Fp5-mst-13.2.git debugger "d" command doesnt check line number Message-Id: p4raw-id: //depot/perl@6588 --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index e68c13e..b8ac490 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -941,8 +941,12 @@ EOP next CMD; }; $cmd =~ /^d\b\s*(\d*)/ && do { $i = $1 || $line; - $dbline{$i} =~ s/^[^\0]*//; - delete $dbline{$i} if $dbline{$i} eq ''; + if ($dbline[$i] == 0) { + print $OUT "Line $i not breakable.\n"; + } else { + $dbline{$i} =~ s/^[^\0]*//; + delete $dbline{$i} if $dbline{$i} eq ''; + } next CMD; }; $cmd =~ /^A$/ && do { print $OUT "Deleting all actions...\n"; diff --git a/mg.c b/mg.c index 884e0fa..1e5c994 100644 --- a/mg.c +++ b/mg.c @@ -1277,8 +1277,6 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg) atoi(MgPV(mg,n_a)), FALSE); if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp)))) o->op_private = i; - else if (ckWARN_d(WARN_INTERNAL)) - Perl_warner(aTHX_ WARN_INTERNAL, "Can't break at that line\n"); return 0; } diff --git a/pod/perldiag.pod b/pod/perldiag.pod index eef6677..70daac2 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -444,12 +444,6 @@ L. (F) Only hard references may be blessed. This is how Perl "enforces" encapsulation of objects. See L. -=item Can't break at that line - -(S internal) A warning intended to only be printed while running within -the debugger, indicating the line number specified wasn't the location -of a statement that could be stopped at. - =item Can't call method "%s" in empty package "%s" (F) You called a method correctly, and it correctly indicated a package