COREDUMP_WRITE(9)
β¨ COREDUMP_WRITE(9) β¨
okay so bestie, welcome to the coredump_write era of the NetBSD Kernel Developer's Manual π (yes it's a section 9 page, yes we're reading it, yes we're thriving).
π NAME π
coredump_write β the common coredump write routine, aka the little legend that actually puts your crash info onto disk π«Ά
πΈ SYNOPSIS πΈ
#include <sys/signalvar.h>
int
coredump_write(void *iocookie, enum uio_seg segflg, const void *data,
size_t len);
literally just include the header and call it, iykyk β¨
π¦ DESCRIPTION π¦
so coredump_write() is the shared bestie used by both machine-dependent and machine-independent components to write information to a coredump π
no cap, both sides use the same routine.
let's break down the args, because we love a signature:
iocookieβ an opaque pointer that was supplied to the caller ofcoredump_write(). it's giving "don't look at me, i'm just the cookie" πsegflgβ tells you where the data is located: system space or user space. vibe check on the memory region β¨dataβ points to the information to be written to the coredump πlenβ the amount of data to be written. the length. the size. the moment π₯
and the return? coredump_write() returns 0 on success and an appropriate error code on failure. periodt π
π CODE REFERENCES π
where does the magic happen? bestie, i got you, here's the map πΊοΈ
- 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.corsys/kern/core_elf64.cβ - Process core dumps for other NetBSD binaries are performed within the file
sys/kern/core_netbsd.cπ
π§ SEE ALSO π§
cpu_coredump(9)β go read that one next, bestie, it's iconic π
and that's the whole page, fr fr π this was Debian, December 24, 2005 β happy holidays to this manpage specifically πβ¨ slay, and good luck out there with your coredumps π«Ά
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2005 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms