Update man pages for new coredump interface.

This commit is contained in:
matt 2005-12-24 21:07:05 +00:00
parent ae6ae2c362
commit 3fff2406b3
4 changed files with 110 additions and 15 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.837 2005/12/20 19:53:15 rpaulo Exp $
# $NetBSD: mi,v 1.838 2005/12/24 21:07:05 matt Exp $
./etc/mtree/set.comp comp-sys-root
./usr/bin/addr2line comp-debug-bin bfd
./usr/bin/ar comp-util-bin bfd
@ -5127,6 +5127,7 @@
./usr/share/man/cat9/copyout_proc.0 comp-sys-catman .cat
./usr/share/man/cat9/copyoutstr.0 comp-sys-catman .cat
./usr/share/man/cat9/copystr.0 comp-sys-catman .cat
./usr/share/man/cat9/coredump_write.0 comp-sys-catman .cat
./usr/share/man/cat9/cpu_configure.0 comp-sys-catman .cat
./usr/share/man/cat9/cpu_coredump.0 comp-sys-catman .cat
./usr/share/man/cat9/cpu_dump.0 comp-sys-catman .cat
@ -9057,6 +9058,7 @@
./usr/share/man/man9/copyout_proc.9 comp-sys-man .man
./usr/share/man/man9/copyoutstr.9 comp-sys-man .man
./usr/share/man/man9/copystr.9 comp-sys-man .man
./usr/share/man/man9/coredump_write.9 comp-sys-man .man
./usr/share/man/man9/cpu_configure.9 comp-sys-man .man
./usr/share/man/man9/cpu_coredump.9 comp-sys-man .man
./usr/share/man/man9/cpu_dump.9 comp-sys-man .man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.185 2005/12/21 15:36:38 rpaulo Exp $
# $NetBSD: Makefile,v 1.186 2005/12/24 21:07:05 matt Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@ -6,6 +6,7 @@ MAN= altq.9 arc4random.9 arp.9 audio.9 autoconf.9 \
bitmask_snprintf.9 bcmp.9 bcopy.9 bzero.9 \
buffercache.9 bufq.9 bus_dma.9 bus_space.9 \
callout.9 cardbus.9 chooselwp.9 cnmagic.9 config.9 cons.9 copy.9 \
coredump_write.9 \
cpu_configure.9 cpu_coredump.9 cpu_dumpconf.9 cpu_exit.9 cpu_idle.9 \
cpu_lwp_fork.9 \
cpu_initclocks.9 cpu_number.9 cpu_reboot.9 cpu_rootconf.9 \

View File

@ -0,0 +1,86 @@
.\" $NetBSD: coredump_write.9,v 1.1 2005/12/24 21:07:05 matt 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" 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

View File

@ -1,6 +1,6 @@
.\" $NetBSD: cpu_coredump.9,v 1.7 2005/12/20 19:53:15 rpaulo Exp $
.\" $NetBSD: cpu_coredump.9,v 1.8 2005/12/24 21:07:05 matt Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd December 20, 2005
.Dd December 24, 2005
.Dt CPU_COREDUMP 9
.Os
.Sh NAME
@ -43,8 +43,9 @@
.Sh SYNOPSIS
.In sys/signalvar.h
.Ft int
.Fn cpu_coredump "struct lwp *l" "struct vnode *vp" "struct ucred *cred" \
"struct core *chdr"
.Fn cpu_coredump "struct lwp *l" "void *iocookie" "struct core *chdr"
.Ft int
.Fn cpu_coredump32 "struct lwp *l" "void *iocookie" "struct core32 *chdr"
.Sh DESCRIPTION
.Fn cpu_coredump
is the machine-dependent interface invoked by machine-independent code
@ -52,12 +53,11 @@ to dump the machine-dependent header information at the start of a
process core dump.
The header information primarily consists of the
CPU and floating-point registers.
.Fa p
is the process structure of the processing being dumped.
.Fa vp
is the vnode pointer to the process core dump file.
.Fa cred
are the credentials of the core dump file.
.Fa l
is the lwp structure of the thread being dumped.
.Fa iocookie
is an opaque pointer to be passed to
.Fn coredump_write .
Information about the machine-dependent header sections are returned in
.Fa chdr .
.Pp
@ -73,9 +73,15 @@ All pathnames are relative to
.Pp
Process core dumps are initiated within the file
.Pa sys/kern/kern_sig.c .
Process core dumps for native
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 vnode 9
.Xr coredump_write 9