v2.13
v2.13
build-id/debuginfod improvements:
When present, ELF headers found in a core file will be searched for an ELF build-id - (such headers are dumped by the kernel if bit 5/value 0x10 is set in /proc/self/coredump_filter for a process, which is defaulted to on on most modern systems).
Similarly, the AT_PHDR note is used to find the dynamic linker structures needed to find shared libraries loaded by the process. Previously, this required the executable to be present locally.
The filesystem access layer in pstack has been rejigged so ELF build IDs are the primary key used to find ELF content, with library names being used as a fallback. debuginfod is only used if --debuginfod is supplied on the command line, but will now also be used to find executables in preference to the local paths when used.
These changes mean that core files from different environments can be directly queried if you have debuginfod servers available. There are also new command-line options to control the search paths used for ELF files, which you can similarly used to point pstack at separately downloaded image files.
Other changes:
Improved note handling (iteration can be done over either segments (for executables) or sections (for debug images)
When backtracing through frames that were unwound from signal trampolines, do not adjust the instruction pointer backwards when searching for call frame information. This is normally done for stack frames that have invoked "call" instructions, to ensure that the debug info uses the call instruction, rather than the following one, for CFI. However, for instructions where control transferred via a signal handler, this is the wrong thing to do, and when the instruction ends up on the wrong side of a change in the CFA, can prevent unwinding working properly through such frames.