Commit Graph

3 Commits

Author SHA1 Message Date
John Baldwin
5ef5fd6e53 Ensure 'kvm' is always initialized. If "-M" was not specified and the
garbage value on the stack was not zero, then 'ddb capture' would try to
use the garbage value as a kvm_t pointer.

MFC after:	1 week
2009-11-02 20:18:50 +00:00
John Baldwin
742765c971 When extracting the capture buffer from a crashdump, only read the valid
portion of the capture buffer (db_capture_bufoff vs db_capture_bufsize).
This could result in outputting garbage (e.g. lots of 'p' characters if
DIAGNOSTIC is enabled) after the end of the capture buffer.  While here,
fix a spelling nit.

Reported by:	Mikolaj Golub  to my trociny of gmail
MFC after:	3 days
2009-10-29 13:44:58 +00:00
Robert Watson
0693424576 Add "ddb capture print" and "ddb capture status" commands do ddb(8),
alowing the DDB output capture buffer to be easily extracted from
user space.  Both of these commands include -M/-N arguments, allowing
them to be used with kernel crash dumps (or /dev/mem).

This makes it easier to use DDB scripting and output capture with
minidumps or full dumps rather than with text dumps, allowing DDB
output (scripted or otherwise) to be easily extracted from a crash
dump.

MFC after:	1 week
Discussed with:	brooks, jhb
2008-04-25 17:34:09 +00:00