HomeFreeBSD

gcore: Use PT_GETREGSET to fetch NT_PRSTATUS and NT_FPREGSET.

Description

gcore: Use PT_GETREGSET to fetch NT_PRSTATUS and NT_FPREGSET.

Add a elf_putregnote() helper to build the ELF note for a register
set. Once nice result of this approach is that this reuses the
kernel's support for generating 32-bit register sets for 32-bit
processes avoiding the need to duplicate that logic in elf32core.c.

Reviewed by: markj
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D34447

Details

Provenance
jhbAuthored on Mar 10 2022, 11:40 PM
Reviewer
markj
Differential Revision
D34447: gcore: Use PT_GETREGSET to fetch NT_PRSTATUS and NT_FPREGSET.
Parents
rG6b71405bfe8d: Store core dump notes for all valid register sets for FreeBSD processes.
Branches
Unknown
Tags
Unknown