FUNCTION::SPRINT_SYM(3stap)

πŸ’– FUNCTION::SPRINT_SYMS πŸ’–

okay so bestie, we're in the Context Functions corner of the 3stap manual, and today's main character is function::sprint_syms β€” the girl who turns a lil string of kernel addresses into an actual stack trace. she's giving translator energy fr fr 🧚✨


🌸 NAME 🌸

function::sprint_syms β€” literally returns the stack for kernel addresses, but like, from a string. no cap. πŸ’…


✨ SYNOPSIS ✨

sprint_syms(callers:string)

πŸŽ€ ARGUMENTS πŸŽ€

  • callers β€” a string holding a list of hexadecimal (kernel) addresses. that's it, that's the input 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

so what she does is: she takes the addresses sitting in that string and does a symbolic lookup on them. and the vibe check here is that those addresses are assumed to be the result of a prior call to stack, callers, and similar functions. iykyk. 🌈

she hands you back a simple backtrace from that hex string β€” one line per address, periodt. each line is giving:

  • the symbol name β€” or the plain hex address if the symbol just couldn't be resolved, tragic 😭
  • the module name, if one was found, as obtained from symdata
  • the offset from the start of the function, if that's found. and if it's not found? then the offset gets added to the module instead (if the module was found), sitting right there between brackets. cute.

and the whole backtrace comes back as a string, with every single line terminated by a newline character. iconic. ⭐

⚠️ heads up bestie, important one: the returned stack gets truncated to MAXSTRINGLEN. so if you're craving fuller and richer stacks, don't use this one β€” go use print_syms instead. not me warning you twice πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


SystemTap Tapset Reference Ver, September 2026 β€” mwah, that's a wrap, go slay some backtraces bestie πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from