lookup_prev_stack_frame(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– lookup_prev_stack_frame(9) πŸ’–

okay so bestie, welcome to the lookup_prev_stack_frame(9) page from the Kernel API Manual β€” this is the microblaze stack-unwinding lore and ngl it's kind of iconic once you get it. it's literally a little detective that goes "who called you, bestie? πŸ‘€" and hands you back the previous function's frame. let's get into it 🫢


✨ NAME ✨

lookup_prev_stack_frame β€” find the stack frame of the previous function. that's it, that's the vibe ✨


πŸŽ€ SYNOPSIS πŸŽ€

int lookup_prev_stack_frame (unsigned long fp , unsigned long pc ,
unsigned long leaf_return , unsigned long *pprev_fp , unsigned long
*pprev_pc );

copy it exactly like that, no cap 🧚


🌸 ARGUMENTS 🌸

  • fp β€” the frame (stack) pointer for the current function πŸ’…
  • pc β€” the program counter, chillin' inside the current function
  • leaf_return β€” the r15 value within the current function. and here's the tea: if the current function is a leaf, this is the caller's return address πŸ‘‘
  • pprev_fp β€” on exit, this gets set to the frame (stack) pointer for the previous function πŸ¦‹
  • pprev_pc β€” on exit, this gets set to the current function's caller's return address ⭐

πŸ”₯ DESCRIPTION πŸ”₯

okay so the return value is giving very simple, very demure:

  • 0 on success β€” slay πŸ’–
  • -EINVAL if the previous frame cannot be found β€” like, it's just not there bestie, and that's a -EINVAL 😭

that's the whole description, no extra plot twists, periodt.


🌈 SEE ALSO 🌈

go check these out, iykyk πŸ‘‘


and that's the whole page, bestie πŸŽ€βœ¨

this little masterpiece lives in ./arch/microblaze/kernel and the date on it is October 2026 β€” so yeah, mark your calendar and stan the unwinder πŸ’œπŸ’…πŸ¦‹

πŸ“¦ where this page comes from