HomePhabricator

[Process/elf-core] Read PID from FreeBSD prpsinfo

Authored by mgorny on May 5 2021, 4:06 AM.

Description

[Process/elf-core] Read PID from FreeBSD prpsinfo

Add a function to read NT_PRPSINFO note from FreeBSD core dumps. This
is necessary to get the process ID (NT_PRSTATUS has only thread ID).
Move the lp64 check from NT_PRSTATUS parsing to the parseFreeBSDNotes()
to avoid repeating it.

Differential Revision: https://reviews.llvm.org/D101893

Details