summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1991-01-11 08:58:45 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1991-01-11 08:58:45 +0000
commit27e2fb84680b9cc1db17238d5bf10b97626f477f (patch)
tree39824ce086ad815a976233d0edef5992b06e833c /lib
parentc623bd54707a8bf975b272e17e7c3b3342b31eb0 (diff)
downloadperl-27e2fb84680b9cc1db17238d5bf10b97626f477f.tar.gz
perl 3.0 patch #44 patch #42, continuedperl-3.044
See patch #42.
Diffstat (limited to 'lib')
-rw-r--r--lib/perldb.pl19
-rw-r--r--lib/pwd.pl6
2 files changed, 17 insertions, 8 deletions
diff --git a/lib/perldb.pl b/lib/perldb.pl
index c86fb16506..4c2f54d499 100644
--- a/lib/perldb.pl
+++ b/lib/perldb.pl
@@ -1,6 +1,6 @@
package DB;
-$header = '$Header: perldb.pl,v 3.0.1.5 90/11/10 01:40:26 lwall Locked $';
+$header = '$Header: perldb.pl,v 3.0.1.6 91/01/11 18:08:58 lwall Locked $';
#
# This file is automatically included if you do perl -d.
# It's probably not useful to include this yourself.
@@ -10,6 +10,9 @@ $header = '$Header: perldb.pl,v 3.0.1.5 90/11/10 01:40:26 lwall Locked $';
# have a breakpoint. It also inserts a do 'perldb.pl' before the first line.
#
# $Log: perldb.pl,v $
+# Revision 3.0.1.6 91/01/11 18:08:58 lwall
+# patch42: @_ couldn't be accessed from debugger
+#
# Revision 3.0.1.5 90/11/10 01:40:26 lwall
# patch38: the debugger wouldn't stop correctly or do action routines
#
@@ -62,7 +65,7 @@ sub DB {
$signal |= 1;
}
else {
- &eval("\$DB'signal |= do {$stop;}");
+ $evalarg = "\$DB'signal |= do {$stop;}"; &eval;
$dbline{$line} =~ s/;9($|\0)/$1/;
}
}
@@ -74,9 +77,9 @@ sub DB {
print OUT "$sub($filename:$i):\t",$dbline[$i];
}
}
- &eval($action) if $action;
+ $evalarg = $action, &eval if $action;
if ($single || $signal) {
- &eval($pre) if $pre;
+ $evalarg = $pre, &eval if $pre;
print OUT $#stack . " levels deep in subroutine calls!\n"
if $single & 4;
$start = $line;
@@ -452,11 +455,11 @@ command Execute as a perl statement in current package.
};
};
next; };
- &eval($cmd);
+ $evalarg = $cmd; &eval;
print OUT "\n";
}
if ($post) {
- &eval($post);
+ $evalarg = $post; &eval;
}
}
($@, $!, $[, $,, $/, $\) = @saved;
@@ -467,8 +470,10 @@ sub save {
$[ = 0; $, = ""; $/ = "\n"; $\ = "";
}
+# The following takes its argument via $evalarg to preserve current @_
+
sub eval {
- eval "$usercontext $_[0]; &DB'save";
+ eval "$usercontext $evalarg; &DB'save";
print OUT $@;
}
diff --git a/lib/pwd.pl b/lib/pwd.pl
index c141e9888e..7abcc1f97d 100644
--- a/lib/pwd.pl
+++ b/lib/pwd.pl
@@ -1,8 +1,11 @@
;# pwd.pl - keeps track of current working directory in PWD environment var
;#
-;# $Header: pwd.pl,v 3.0.1.1 90/08/09 04:01:24 lwall Locked $
+;# $Header: pwd.pl,v 3.0.1.2 91/01/11 18:09:24 lwall Locked $
;#
;# $Log: pwd.pl,v $
+;# Revision 3.0.1.2 91/01/11 18:09:24 lwall
+;# patch42: some .pl files were missing their trailing 1;
+;#
;# Revision 3.0.1.1 90/08/09 04:01:24 lwall
;# patch19: Initial revision
;#
@@ -46,3 +49,4 @@ sub main'chdir {
}
}
+1;