diff options
author | Mark-Jason Dominus <mjd@plover.com> | 2002-02-12 15:20:42 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-13 05:11:12 +0000 |
commit | d03c2a1b901127d77518bbc18d5271b287c9e28b (patch) | |
tree | a1cffd63acaaeff6736cdd7f6c80e6f927d67c99 /lib/perl5db.pl | |
parent | 8c19e1b53a04299dd91f058f8d14822bb18b45e5 (diff) | |
download | perl-d03c2a1b901127d77518bbc18d5271b287c9e28b.tar.gz |
New debugger option 'dumpDepth' controls recursion depth of 'x' command
Message-ID: <20020213012042.25245.qmail@plover.com>
p4raw-id: //depot/perl@14670
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r-- | lib/perl5db.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl index c1996b0852..1f502117de 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -328,7 +328,8 @@ $trace = $signal = $single = 0; # Uninitialized warning suppression # (local $^W cannot help - other packages!). $inhibit_exit = $option{PrintRet} = 1; -@options = qw(hashDepth arrayDepth DumpDBFiles DumpPackages DumpReused +@options = qw(hashDepth arrayDepth dumpDepth + DumpDBFiles DumpPackages DumpReused compactDump veryCompact quote HighBit undefPrint globPrint PrintRet UsageOnly frame AutoTrace TTY noTTY ReadLine NonStop LineInfo maxTraceLen @@ -1826,7 +1827,10 @@ sub dumpit { do 'dumpvar.pl'; } if (defined &main::dumpValue) { - &main::dumpValue(shift); + my $v = shift; + my $maxdepth = shift || $option{dumpDepth}; + $maxdepth = -1 unless defined $maxdepth; # -1 means infinite depth + &main::dumpValue($v, $maxdepth); } else { print $OUT "dumpvar.pl not available.\n"; } @@ -2184,7 +2188,7 @@ sub parse_options { # too dangerous to let intuitive usage overwrite important things # defaultion should never be the default my %opt_needs_val = map { ( $_ => 1 ) } qw{ - arrayDepth hashDepth LineInfo maxTraceLen ornaments windowSize + dumpDepth arrayDepth hashDepth LineInfo maxTraceLen ornaments windowSize pager quote ReadLine recallCommand RemotePort ShellBang TTY }; while (length) { |