NetBSD-5.0.2/share/man/man9/coredump_write.9

Compare this file to the similar file:
Show the results in this format:

.\"     $NetBSD: coredump_write.9,v 1.4 2008/07/11 13:20:17 gdt Exp $
.\"
.\" Copyright (c) 2005 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Matt Thomas.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 24, 2005
.Dt COREDUMP_WRITE 9
.Os
.Sh NAME
.Nm coredump_write
.Nd common coredump write routine
.Sh SYNOPSIS
.In sys/signalvar.h
.Ft int
.Fn coredump_write "void *iocookie" "enum uio_seg segflg" \
"const void *data" "size_t len"
.Sh DESCRIPTION
.Fn coredump_write
is used by both machine-dependent and machine-independent components
to write information to a coredump.
.Fa iocookie
is an opaque pointer that was supplied to the caller of
.Fn coredump_write .
.Fa segflg
indicates where the
.Fa data
is located, system space or user space.
.Fa data
points to the information to be written to the coredump.
.Fa len
is the amount of data to be written.
.Pp
.Fn coredump_write
returns 0 on success and an appropriate error code on failure.
.Sh CODE REFERENCES
This section describes places within the
.Nx
source tree where actual code implementing or using
.Fn coredump_write
can be found.
All pathnames are relative to
.Pa /usr/src .
.Pp
Process core dumps are initiated within the file
.Pa sys/kern/kern_sig.c .
Process core dumps for ELF
.Nx
binaries are performed within the files
.Pa sys/kern/core_elf32.c
or
.Pa sys/kern/core_elf64.c .
Process core dumps for other
.Nx
binaries are performed within the file
.Pa sys/kern/core_netbsd.c .
.Sh SEE ALSO
.Xr cpu_coredump 9