STRUCT UNWIND_STATE(9)
β¨ struct unwind_state(9) β¨ β Kernel API Manual
okay so bestie, we're doing the <rainbow>struct unwind_state</rainbow> glow-up today π
this is from the Kernel API Manual and honestly? it's giving "the little struct that keeps your stack walking from face-planting." robust unwinding, no cap π«Ά
πΈ NAME πΈ
struct unwind_state β state used for robust unwinding. literally the vibe-check holder for when the kernel needs to walk back through frames and not trip π
π SYNOPSIS π
struct unwind_state {
unsigned long fp;
unsigned long pc;
struct stack_info stack;
struct stack_info *stacks;
int nr_stacks;
};
look at her. five fields. immaculate. β¨
π Members π
fpβ thefpvalue in the frame record (or the realfp) π¦pcβ thelrvalue in the frame record (or the reallr) π¦stackβ the stack currently being unwound πstacksβ an array of stacks which can be unwound πnr_stacksβ the number of stacks instacksβ
ngl, fp and pc having that "(or the real fp)" / "(or the real lr)" parenthetical is lowkey the main character energy of this whole struct π like which one is it bestie, the frame record one or the real one β that's the whole bit, iykyk.
π₯ SEE ALSO π₯
- Kernel file
./arch/arm64/include/asm/stacktrace/common.h unwind_find_stack(9)unwind_consume_stack(9)unwind_next_frame_record(9)
go read those next, fr fr, they're the friend group π«Ά
π reminder bestie: those stack helpers are (9) manpage sections, so go find them in the kernel docs β they're literally right there.
that's the whole page, periodt. β¨ this cutie came out of ./arch/arm64/include/asm/stack... and is dated October 2026, still filed under struct unwind_state(9) π bye bestie, happy unwinding π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms