UNW_IS...L_FRAME(3libunwind)
β¨ UNW_IS_SIGNAL_FRAME β a libunwind moment β¨
okay bestie, welcome to the 3libunwind girlies π this is unw_is_signal_frame, and she is exactly what she sounds like: the check that tells you whether the frame you're staring at is a signal frame or not. no cap.
π SYNOPSIS π
#include <libunwind.h>
int unw_is_signal_frame(unw_cursor_t *cp);
like. that's it. one function. one cursor. one vibe check. π
πΈ DESCRIPTION πΈ
so here's the tea β β unw_is_signal_frame() hands back a positive value if the current frame identified by cp is a signal frame (aka a signal trampoline, iykyk), and a value of 0 if it isn't. that's the whole gig.
now, for the purposes of this discussion, a signal frame is a frame that got created in response to a potentially asynchronous interruption. on UNIX and UNIX-like platforms, those frames are normally made by the kernel when it delivers a signal. and in a kernel environment? a signal frame might, for example, correspond to a frame created in response to a device interrupt. so she's versatile, okay. main character energy across environments π₯
signal frames are kinda unusual though, and here's why: the events that create them are asynchronous, and that async-ness means the contents of registers that are normally treated as scratch (the ``caller-saved'' ones) have to actually be stored. yeah. the "don't worry about it" registers have to be worried about. it's giving chaos but make it documented π«Ά
π RETURN VALUE π
- on successful completion,
unw_is_signal_frame()returns a positive value if the current frame is a signal frame, or0if it is not. - otherwise, it returns a negative value of one of the error codes below π
π¦ THREAD AND SIGNAL SAFETY π¦
unw_is_signal_frame() is thread safe as well as safe to use from a signal handler.
literally the whole package. she can do both. periodt π
β ERRORS β
UNW_ENOINFOβ libunwind is unable to determine whether or not the current frame is a signal frame. like she tried, bestie, she just doesn't know π
π SEE ALSO π
libunwind(3libunwind)unw_get_reg(3libunwind)unw_set_reg(3libunwind)unw_get_fpreg(3libunwind)unw_set_fpreg(3libunwind)
go read the whole squad, fr fr πβ¨
π AUTHOR π
David Mosberger-Tang Email: dmosberger@gmail.com WWW: http://www.nongnu.org/libunwind/.
this whole page is part of the Programming Library, and this particular revision is dated 29 August 2023 β so yeah, she's got a timestamp, she's got a home in 3libunwind, and she's iconic. that's the sign-off, bestie, go unwind some frames πππ¦πΈπ
π¦ where this page comes from
- alpine 3.22: libunwind-doc 1.8.1-r0 Β· MIT
- alpine 3.23: libunwind-doc 1.8.1-r0 Β· MIT
- alpine 3.24: libunwind-doc 1.8.3-r0 Β· MIT
- arch rolling: libunwind 1.8.3-1 Β· MIT
- epel 10: libunwind-devel 1.8.0-4.el10_0 Β· MIT
- epel 9: libunwind-devel 1.8.0-4.el9 Β· MIT
- fedora 43: libunwind-devel 1.8.1-3.fc43 Β· MIT
- fedora 43: libunwind-devel 1.8.1-3.fc43 Β· MIT
- fedora 43: libunwind-devel 1.8.3-4.fc43 Β· MIT
- fedora 43: libunwind-devel 1.8.3-4.fc43 Β· MIT
- fedora 44: libunwind-devel 1.8.3-1.fc44 Β· MIT
- fedora 44: libunwind-devel 1.8.3-1.fc44 Β· MIT
- fedora 44: libunwind-devel 1.8.3-4.fc44 Β· MIT
- fedora 44: libunwind-devel 1.8.3-4.fc44 Β· MIT
- nixpkgs unstable: libunwind 1.8.3-devman
- opensuse-leap 16.0: libunwind-devel 1.8.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: libunwind-devel 1.8.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: libunwind-devel 1.8.1-160000.2.2 Β· MIT
- opensuse-leap 16.0: libunwind-devel 1.8.1-160000.2.2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms