FUNCTION::SPRINT_UST(3stap)

πŸ’– NAME πŸ’–

function::sprint_ustack β€” bestie, this one hands you back the stack for the current task, but as a string. Yes, a string. Slay.

Oh and hey, this page lives in section 3stap (the SystemTap tapset reference manual), just so you know where you are 🫢


✨ SYNOPSIS ✨

sprint_ustack:string(stk:string)

πŸŽ€ ARGUMENTS πŸŽ€

  • stk β€” a string stuffed full of hexadecimal addresses for the current task. That's the whole vibe. That's what you're feeding it.

🌸 DESCRIPTION 🌸

Okay so here's the tea: sprint_ustack does a symbolic lookup on all the addresses sitting in that string you passed in. And it assumes β€” lowkey firmly assumes β€” that this string is the result of a previous call to ubacktrace for the current task. So don't just hand it random hex, bestie, it's expecting a specific origin story.

What you get back is a simple backtrace built from the given hex string. One line per address. Periodt.

Each line includes:

  • the symbol name β€” or the raw hex address if the symbol just couldn't be resolved 😭
  • the module name, if it was found
  • the offset from the start of the function, if found. If it wasn't found, the offset gets added to the module instead (in between brackets, if the module was found)

The whole thing comes back as a string, and each line is terminated by a newline character. Clean, tidy, iconic. ✨

Heads up though: the returned stack gets truncated to MAXSTRINGLEN. That's just how it is. So if you want fuller, richer, more main-character stacks, go use print_ustack instead. 🫢

πŸ’… NOTE πŸ’…

For real, it is recommended to use sprint_usyms instead of this function. Not me telling you twice. iykyk. πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹


That's the whole page, bestie πŸ’œ β€” brought to you by the SystemTap Tapset Reference, version Ver, dated September 2026. Go forth and symbolize responsibly. πŸŽ€βœ¨

πŸ“¦ where this page comes from