debugger "d" command doesnt check line number
authorMike Guy <mjtg@cam.ac.uk>
Tue, 8 Aug 2000 21:54:29 +0000 (22:54 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 11 Aug 2000 01:06:40 +0000 (01:06 +0000)
Message-Id: <E13MGOL-000053-00@libra.cus.cam.ac.uk>

p4raw-id: //depot/perl@6588

lib/perl5db.pl
mg.c
pod/perldiag.pod

index e68c13e..b8ac490 100644 (file)
@@ -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 (file)
--- 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;
 }
 
index eef6677..70daac2 100644 (file)
@@ -444,12 +444,6 @@ L<perlfunc/pack>.
 (F) Only hard references may be blessed.  This is how Perl "enforces"
 encapsulation of objects.  See L<perlobj>.
 
-=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