]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 303002: Include process IDs in core dumps.
authorjhb <jhb@FreeBSD.org>
Fri, 28 Oct 2016 03:54:19 +0000 (03:54 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 28 Oct 2016 03:54:19 +0000 (03:54 +0000)
commit4c1afdb90f1d81b4565cdaf52a555ad8c7f3faea
tree751399751a7dd81fd5b871b7460f4c155f740995
parent7dcc3aa4da1bb5157bfc16f2bbaa3540d8df47e8
MFC 303002: Include process IDs in core dumps.

When threads were added to the kernel, the pr_pid member of the
NT_PRSTATUS note was repurposed to store LWP IDs instead of process
IDs.  However, the process ID was no longer recorded in core dumps.
This change adds a pr_pid field to prpsinfo (NT_PRSINFO).  Rather than
bumping the prpsinfo version number, note parsers can use the note's
payload size to determine if pr_pid is present.
sys/kern/imgact_elf.c
sys/sys/procfs.h
usr.bin/gcore/elfcore.c