From: Ilya Zakharevich Date: Wed, 28 Oct 1998 01:23:27 +0000 (-0500) Subject: Minor debugger tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65c9c81d8dce4e55f5c8527bd4579b49e9272c23;p=p5sagit%2Fp5-mst-13.2.git Minor debugger tweaks Message-Id: <199810280623.BAA06968@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@2118 --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 1e5724f..03f9d44 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -235,7 +235,11 @@ $pretype = [] unless defined $pretype; warnLevel($warnLevel); dieLevel($dieLevel); signalLevel($signalLevel); -&pager(defined($ENV{PAGER}) ? $ENV{PAGER} : "|more") unless defined $pager; +&pager((defined($ENV{PAGER}) + ? $ENV{PAGER} + : ($^O eq 'os2' + ? 'cmd /c more' + : 'more'))) unless defined $pager; &recallCommand("!") unless defined $prc; &shellBang("!") unless defined $psh; $maxtrace = 400 unless defined $maxtrace; @@ -412,11 +416,11 @@ EOP $was_signal = $signal; $signal = 0; if ($single || ($trace & 1) || $was_signal) { - $term || &setterm; if ($emacs) { $position = "\032\032$filename:$line:0\n"; print $LINEINFO $position; } elsif ($package eq 'DB::fake') { + $term || &setterm; print_help(< to quit or B to restart, use B I to avoid stopping after program termination, @@ -640,8 +644,9 @@ EOP $arrow .= 'b' if $stop; $arrow .= 'a' if $action; print $OUT "$i$arrow\t", $dbline[$i]; - last if $signal; + $i++, last if $signal; } + print $OUT "\n" unless $dbline[$i-1] =~ /\n$/; } $start = $i; # remember in case they want more $start = $max if $start > $max;