X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fperl5db.pl;h=7b0567c4039f7c858a4ed162451c035af06ed480;hb=9bea678f36dc293400ada67aa122ef456a9dcf74;hp=18196278d9c49a8c81ed3f7129e8984c0cfb086b;hpb=615b993bf8c0434938e2210dee0592d689927961;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 1819627..7b0567c 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2,7 +2,7 @@ package DB; # Debugger for Perl 5.00x; perl5db.pl patch level: -$VERSION = 1.0402; +$VERSION = 1.0403; $header = "perl5db.pl version $VERSION"; # Enhanced by ilya@math.ohio-state.edu (Ilya Zakharevich) @@ -296,7 +296,10 @@ if ($notty) { #require Term::ReadLine; - if (-e "/dev/tty") { + if ($^O =~ /cygwin/) { + # /dev/tty is binary. use stdin for textmode + undef $console; + } elsif (-e "/dev/tty") { $console = "/dev/tty"; } elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') { $console = "con"; @@ -313,6 +316,10 @@ if ($notty) { $console = undef; } + if ($^O eq 'epoc') { + $console = undef; + } + $console = $tty if defined $tty; if (defined $console) { @@ -343,7 +350,7 @@ if ($notty) { print $OUT ("Emacs support ", $emacs ? "enabled" : "available", ".\n"); - print $OUT "\nEnter h or `h h' for help.\n\n"; + print $OUT "\nEnter h or `h h' for help, run `perldoc perldebug' for more help.\n\n"; } } @@ -471,7 +478,7 @@ EOP if $single & 4; $start = $line; $incr = -1; # for backward motion. - @typeahead = @$pretype, @typeahead; + @typeahead = (@$pretype, @typeahead); CMD: while (($term || &setterm), ($term_pid == $$ or &resetterm), @@ -1860,6 +1867,8 @@ B Pure-man-restart of debugger, some of debugger state history, breakpoints and actions, debugger Bptions and the following command-line options: I<-w>, I<-I>, I<-e>. B [I] Get help [on a specific debugger command], enter B<|h> to page. + Complete description of debugger is available in B + section of Perl documention B Summary of debugger commands. B or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction. @@ -1869,18 +1878,17 @@ I I B [I|I] List source code B Stack trace B<-> or B<.> List previous/current line B [I] Single step [in expr] B [I] List around line B [I] Next, steps over subs - B I View source in file > Repeat last B or B + B I View source in file /B> Repeat last B or B BIB BIB Search forw/backw B Return from subroutine B Show versions of modules B [I|I] Continue until position I B List break/watch/actions B [...] Set debugger options B [I] Toggle trace [trace expr] - B<<>[B<<>] or B<{>[B<{>] [I] Do before prompt B [I|I] [I] Set breakpoint - B<>>[B<>>] [I] Do after prompt B I [I] Set breakpoint for sub + B<<>[B<<>]|B<{>[B<{>]|B<>>[B<>>] [I] Do pre/post-prompt B [I|I|I] [I] Set breakpoint B<$prc> [I|I] Redo a previous command B [I] or B Delete a/all breakpoints B [I<-num>] Display last num commands B [I] I Do cmd before line B<=> [I I] Define/list an alias B I Add a watch expression B [I] Get help on command B or B Delete all actions/watch - B<|>[B<|>]I Send output to pager B<$psh>\[B<$psh>\] I Run cmd in a subprocess + B<|>[B<|>]I Send output to pager B<$psh>\[B<$psh>\] I Run cmd in a subprocess B or B<^D> Quit B Attempt a restart I B Execute perl code, also see: B,B,B I B|B I Evals expr in array context, dumps the result or lists methods. @@ -1888,6 +1896,7 @@ I B Execute perl code, also see: B,B,B< B [[B]I] List subroutine names [not] matching pattern B [I [I]] List Variables in Package. Vars can be ~pattern or !pattern. B [I] Same as \"B I [I]\". +I BI<:> Type B I Run B for more help. END_SUM # ')}}; # Fix balance of Emacs parsing }