]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r249486:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 6 May 2013 20:58:02 +0000 (20:58 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 6 May 2013 20:58:02 +0000 (20:58 +0000)
commitbb81ea571b0cc9d4da53e31b28ed83d2f9448b29
tree50c484f25da84ee64d69cdee181c665543dc3b33
parentf15466eb3dc4ad37bd35727c7fed46e50738bcdf
MFC r249486:

Re-factor coredump routines.  For each type of notes an output
function is provided, which is used either to calculate the note size
or output it to sbuf.  On the first pass the notes are registered in a
list and the resulting size is found, on the second pass the list is
traversed outputing notes to sbuf.  For the sbuf a drain routine is
provided that writes data to a core file.

The main goal of the change is to make coredump to write notes
directly to the core file, without preliminary preparing them all in a
memory buffer.  Storing notes in memory is not a problem for the
current, rather small, set of notes we write to the core, but it may
becomes an issue when we start to store procstat notes.

Reviewed by: jhb (initial version), kib
Discussed with: jhb, kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@250309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/imgact_elf.c