diff options
author | Ilya Zakharevich <ilya@math.ohio-state.edu> | 1996-11-29 00:33:49 -0500 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-11-30 05:31:00 +1200 |
commit | 9e0ff5ef23e91404cf40a8d53c9c0dcd28c6448f (patch) | |
tree | b137b12404615a045608605dafe342c78547ec72 | |
parent | 9fcfb7d3fd98112237a529ff1b3b6bc885c416a0 (diff) | |
download | perl-9e0ff5ef23e91404cf40a8d53c9c0dcd28c6448f.tar.gz |
Minor patch to debugger
This makes the new behaviour a little bit more transparent (now you
need q to quit), and avoids one malloc/free pair in the signal handler.
p5p-msgid: <199611290533.AAA08053@monk.mps.ohio-state.edu>
-rw-r--r-- | lib/perl5db.pl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 3f3a4c2762..981b24e386 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -728,17 +728,17 @@ sub DB { } next CMD; }; $cmd =~ /^n$/ && do { - next CMD if $finished and $level <= 1; + end_report(), next CMD if $finished and $level <= 1; $single = 2; $laststep = $cmd; last CMD; }; $cmd =~ /^s$/ && do { - next CMD if $finished and $level <= 1; + end_report(), next CMD if $finished and $level <= 1; $single = 1; $laststep = $cmd; last CMD; }; $cmd =~ /^c\b\s*([\w:]*)\s*$/ && do { - next CMD if $finished and $level <= 1; + end_report(), next CMD if $finished and $level <= 1; $i = $1; if ($i =~ /\D/) { # subroutine name ($file,$i) = ($sub{$i} =~ /^(.*):(.*)$/); @@ -766,7 +766,7 @@ sub DB { } last CMD; }; $cmd =~ /^r$/ && do { - next CMD if $finished and $level <= 1; + end_report(), next CMD if $finished and $level <= 1; $stack[$#stack] |= 1; $doret = $option{PrintRet} ? $#stack - 1 : -2; last CMD; }; @@ -1381,6 +1381,7 @@ sub get_list { sub catch { $signal = 1; + return; # Put nothing on the stack - malloc/free land! } sub warn { @@ -1581,7 +1582,7 @@ R Pure-man-restart of debugger, some of debugger state and command-line options may be lost. h [db_command] Get help [on a specific debugger command], enter |h to page. h h Summary of debugger commands. -q or ^D Quit. +q or ^D Quit. Set \$DB::finished to 0 to debug global destruction. "; $summary = <<"END_SUM"; @@ -1813,9 +1814,11 @@ sub db_complete { return &readline::rl_filename_list($text); # filenames } +sub end_report { print $OUT "Use `q' to quit and `R' to restart. `h q' for details.\n" } + END { $finished = $inhibit_exit; # So that some keys may be disabled. - $DB::single = 1; + $DB::single = !$exiting; # Do not trace destructors on exit DB::fake::at_exit() unless $exiting; } |