FUNCTION::SPRINT_STA(3stap)

πŸ’– FUNCTION::SPRINT_STA πŸ’–

okay bestie, welcome to the Context Functions chapter of the SystemTap Tapset Reference (that's the 3stap manual, iykyk) ✨


🌸 NAME 🌸

function::sprint_stack β€” bestie it returns the stack for kernel addresses, straight outta a string 🫢


✨ SYNOPSIS ✨

sprint_stack:string(stk:string)

πŸŽ€ ARGUMENTS πŸŽ€

  • stk β€” a string stuffed with a list of hexadecimal (kernel) addresses. that's the whole vibe. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so what this does is it does a symbolic lookup of all the addresses sitting in that string you handed it β€” and that string is assumed to be the result of a prior call to backtrace. like, that's the assignment, no cap. πŸ“

It returns a simple backtrace from the given hex string. One line per address. periodt.

What's in each line, you ask? πŸ‘‘

  • the symbol name β€” or, if the symbol couldn't be resolved, the hex address instead πŸ™ˆ
  • the module name (if found)
  • the offset from the start of the function, if found. if it's not found, the offset gets added to the module instead (if found, and it goes between brackets) 🧚

It returns the backtrace as a string, and every single line is terminated by a newline character. slay. ⭐

heads up though β€” the returned stack gets truncated to MAXSTRINGLEN 😭 so if you want fuller and richer stacks, go use print_stack instead. that one eats. πŸ”₯

πŸ’€ NOTE πŸ’€

it is recommended to use sprint_syms instead of this function. not me telling you to switch, but like... do it. 🫢


🌈 SEE ALSO 🌈


SystemTap Tapset Reference β€” Ver β€” September 2026 πŸŽ€

and that's the whole page bestie, mwah, go resolve those symbols πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from