Module Name: src Committed By: kamil Date: Tue Jun 11 23:18:55 UTC 2019
Modified Files: src/sys/kern: kern_exec.c kern_proc.c sys_ptrace_common.c src/sys/sys: proc.h ptrace.h Log Message: Add support for PTRACE_POSIX_SPAWN to report posix_spawn(3) events posix_spawn(3) is a first class syscall in NetBSD, different to (V)FORK+EXEC as these operations are executed in one go. This differs to Linux and FreeBSD, where posix_spawn(3) is implemented with existing kernel primitives (clone(2), vfork(2), exec(3)) inside libc. Typically LLDB and GDB software is aware of FORK/VFORK events. As discussed with the LLDB community, instead of slicing the posix_spawn(3) operation into phases emulating (V)FORK+EXEC(+VFORK_DONE) and returning intermediate state to the debugger, that might have abnormal state, introduce new event type: PTRACE_POSIX_SPAWN. A debugger implementor can easily map it into existing fork+exec semantics or treat as a distinct event. There is no functional change for existing debuggers as there was no support for reporting posix_spawn(3) events on the kernel side. To generate a diff of this commit: cvs rdiff -u -r1.465 -r1.466 src/sys/kern/kern_exec.c cvs rdiff -u -r1.232 -r1.233 src/sys/kern/kern_proc.c cvs rdiff -u -r1.54 -r1.55 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r1.352 -r1.353 src/sys/sys/proc.h cvs rdiff -u -r1.64 -r1.65 src/sys/sys/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.