[Process/elf-core] Read PID from FreeBSD prpsinfo
authorMichał Górny <mgorny@moritz.systems>
Wed, 5 May 2021 11:06:55 +0000 (13:06 +0200)
committerMichał Górny <mgorny@moritz.systems>
Wed, 12 May 2021 09:51:37 +0000 (11:51 +0200)
commit71e66da04cf15cf47045b5d1482803197a24a75d
tree6d1affa034af05dfe2dc268e6659fa06b341c018
parentb6c0edb9792c1a216961aefb63783ab4b986e823
[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
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp