X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fdebug_ring.pl;h=9513b9655078aa58a089edfabf913ff0173ad62d;hb=8ce11d49e52f2ae6ed3c0ddf2a54b2941544acc3;hp=9a2eb01a3334f3e5b13803674431f6f11c0981f3;hpb=83445c4f6ec6c885260944a9abe648aced399c40;p=spider.git diff --git a/cmd/show/debug_ring.pl b/cmd/show/debug_ring.pl index 9a2eb01a..9513b965 100644 --- a/cmd/show/debug_ring.pl +++ b/cmd/show/debug_ring.pl @@ -7,7 +7,17 @@ my $self = shift; my $line = shift;; return (1, $self->msg('e5')) unless $self->priv >= 9; -DXDebug::dbgprintring(); -DXDebug::dbgclearring() if $line =~ /^clear$/; +my @args = split /\s+/, $line; +my $n; +my $doclear; -return (1, 'Contents of debug ring buffer logged. View with watchdbg.'); +for (@args) { + say "arg: $_"; + $n = 0+$_ if /^\d+$/; + $doclear++ if /^clear$/; +} +my $lines = DXDebug::dbgprintring($n); +DXDebug::dbgclearring() if $doclear; +dge; + +return (1, qq{Contents of $lines lines of debug ring buffer logged. View with watchdbg.});