crashinfo: print the content of ddb capture budder
John Baldwin
jhb at freebsd.org
Fri Oct 9 16:08:17 UTC 2009
On Monday 05 October 2009 1:48:06 am Mikolaj Golub wrote:
> Hi,
>
> It would be nice if crashinfo(8) were also trying to output the content of ddb
> capture buffer. Something like in this patch:
>
> --- crashinfo.sh.orig 2009-10-05 08:26:26.000000000 +0300
> +++ crashinfo.sh 2009-10-05 08:43:56.000000000 +0300
> @@ -304,3 +304,18 @@
> echo "kernel config"
> echo
> config -x $KERNEL
> +
> +file=`mktemp /tmp/crashinfo.XXXXXX`
> +if [ $? -eq 0 ]; then
> + ddb capture -M $VMCORE -N $KERNEL print > $file 2>/dev/null
> + if [ -s $file ]; then
> + echo "------------------------------------------------------------------------"
> + echo "ddb capture buffer"
> + echo
> + cat $file |
> + sed -e 's/p\{10\}p*//' # XXX: this removes the unfilled part of a capture buffer
> + echo
> + fi
> + rm -f $file
> +fi
> +
>
I'm definitely in favor of this. I assume you have tested it locally? Do you have a sample
crash.X.txt file with it enabled?
--
John Baldwin
More information about the freebsd-hackers
mailing list