CPU_COREDUMP(9)

πŸ“¦ version 11.0, in nixpkgs unstable

✨ NAME ✨

okay so bestie, welcome to CPU_COREDUMP(9) from the Kernel Developer's Manual β€” this page is literally all about cpu_coredump, the machine-dependent process core dump interface. no cap, that's the whole vibe. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

#include <sys/signalvar.h>

int
cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr);

int
cpu_coredump32(struct lwp *l, void *iocookie, struct core32 *chdr);

yep, both cpu_coredump() and cpu_coredump32() are up there β€” keep those signatures exactly as they are, bestie. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so cpu_coredump() is the machine-dependent interface that machine-independent code invokes to dump the machine-dependent header information at the very start of a process core dump. it's giving backstage-pass energy for the CPU-specific bits. ✨

the header information primarily consists of the CPU and floating-point registers. iconic.

here's the cast:

  • l β€” the lwp structure of the thread being dumped. main character energy. πŸ‘‘
  • iocookie β€” an opaque pointer to be passed to coredump_write(). don't peek inside, it's opaque for a reason. πŸ™ˆ
  • chdr β€” information about the machine-dependent header sections is returned in here. 🫢

cpu_coredump() returns 0 on success and an appropriate error code on failure. periodt. πŸ’…

πŸ”₯ CODE REFERENCES πŸ”₯

process core dumps are initiated within the file sys/kern/kern_sig.c. 🫑

process core dumps for ELF NetBSD binaries are performed within the files sys/kern/core_elf32.c or sys/kern/core_elf64.c. ✨

process core dumps for other NetBSD binaries are performed within the file sys/kern/core_netbsd.c. πŸ’–

πŸ’œ SEE ALSO πŸ’œ


mwah πŸ’‹ β€” this page is from Debian, dated December 24, 2005. now go dump those cores responsibly, bestie! πŸŽ€

πŸ“¦ where this page comes from