pfiles postmortem support
pfiles should support postmortem debugging -- i.e. it would be nice if pfiles could operate on a core file. This would facilitate certain kinds of post mortem debugging, since the map of files opened is generally not available via the traditional userland debuggers. (E.g. dbx has no way to know what file is associated with a given numbered file descriptor.)
Enabling this requires adding a new .note section to the core file (which is just an ELF object) containing per file descriptor information, including details like the path to the file, the various flags, stat structure.
There are two places that generate core dumps -- one in userland (via gcore) in libproc, and another in the kernel elfexec module.
Processing of the core file will require additional support to be added to libproc, and changes to the pfiles command.
This work was suggested by Adam Leventhal at the October 2012 illumos hackathon. I've implemented the work, and hope to integrate it shortly (code review needed first, of course.)
Updated by Garrett D'Amore over 8 years ago
- Status changed from New to Resolved
- % Done changed from 90 to 100
Fixed. It took a little longer because I added support for elfdump to dump the new prfdinfo_t (NT_FDINFO) sections.
Author: Garrett D'Amore <firstname.lastname@example.org>
Date: Fri Nov 2 09:48:42 2012 -0700
3294 pfiles postmortem support
Reviewed by: Robert Mustacchi <email@example.com>
Reviewed by: Richard Lowe <firstname.lastname@example.org>
Approved by: Eric Schrock <email@example.com>