CPU_COREDUMP(9)

NAME
cpu_coredump - machine-dependent process core dump interface

SYNOPSIS
#include <sys/signalvar.h>
int
cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, struct core *chdr);

DESCRIPTION
cpu_coredump() is the machine-dependent interface invoked by machine-independent code 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. p is the process structure of the processing being dumped. vp is the vnode pointer to the process core dump file. cred are the credentials of the core dump file. Information about the machine-dependent header sections are returned in chdr.

cpu_coredump() returns 0 on success and an appropriate error code on failure.

CODE REFERENCES
This section describes places within the NetBSD source tree where actual code implementing or using the machine-dependent coredump interface can be found. All pathnames are relative to /usr/src.

Process core dumps are initiated within the file sys/kern/kern_sig.c. Process core dumps for native NetBSD binaries are performed within the file sys/kern/core_netbsd.c.

SEE ALSO
vnode(9)