HomeFreeBSD

rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64

Description

rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64

The right unwinding stop indicator should be CFI-undefined PC.
https://dwarfstd.org/doc/Dwarf3.pdf - page 118:
If a Return Address register is defined in the virtual unwind table,
and its rule is undefined (for example, by DW_CFA_undefined), then
there is no return address and no call address, and the virtual
unwind of stack activations is complete.

That is allows gdb and libunwind successfully stop when unwinding stack
from global constructors and destructors.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D40794

Details

Provenance
dchaginAuthored on Jul 1 2023, 7:51 AM
Reviewer
kib
Differential Revision
D40794: rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64
Parents
rGf85b82daf1d6: dtrace: third update to the siftr probe
Branches
Unknown
Tags
Unknown