X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fdebug_ring.pl;h=272da35c2bb7d69ca86a07f391c5d7e33ac146d8;hb=cfa6a715412c7c4972ec85034bd2d945751317cb;hp=9a2eb01a3334f3e5b13803674431f6f11c0981f3;hpb=83445c4f6ec6c885260944a9abe648aced399c40;p=spider.git diff --git a/cmd/show/debug_ring.pl b/cmd/show/debug_ring.pl index 9a2eb01a..272da35c 100644 --- a/cmd/show/debug_ring.pl +++ b/cmd/show/debug_ring.pl @@ -7,7 +7,15 @@ 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; + +for (@args) { + $n = 0+$_ if /^\d+$/; + $doclear++ if /^clear$/; +} +DXDebug::dbgprintring($n); +DXDebug::dbgclearring() if $doclear; return (1, 'Contents of debug ring buffer logged. View with watchdbg.');