FUNCTION::USER_STRING_N_QUOTED(3stap)

πŸ’– FUNCTION::USER_STRING_N_QUOTED πŸ’–

okay bestie, so this page lives in the SystemTap Tapset Reference manual, section 3stap β€” it's a tapset function page and it's lowkey iconic, let's get into it ✨


🌸 NAME 🌸

function::user_string_n_quoted β€” grabs a string out of user space and, bestie, it quotes it for you πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

okay so there are two whole flavors of this thing, pick your fighter:

1) user_string_n_quoted:string(addr:long,n:long)

2) user_string_n_quoted:string(addr:long,inlen:long,outlen:long)

πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr β€” the user space address you wanna pull the string from, like literally where it lives πŸ“
  • n β€” the maximum length of the string (if it's not null terminated), no cap fr
  • inlen β€” the maximum length of the string to read (if it's not null terminated)
  • outlen β€” the maximum length of the output string, we're keeping it contained

✨ DESCRIPTION ✨

πŸ“ flavor 1 β€” the n girlie

Returns up to n characters of a C string from the given user space memory address, where any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string. Note that the string will be surrounded by double quotes. On the rare cases when userspace data is not accessible at the given address, the address itself is returned as a string, without double quotes. πŸ™ˆ

πŸ’œ flavor 2 β€” the inlen/outlen girlie

Reads up to inlen characters of a C string from the given user space memory address, and returns up to outlen characters, where any ASCII characters that are not printable are replaced by the corresponding escape sequence in the returned string. Note that the string will be surrounded by double quotes. On the rare cases when userspace data is not accessible at the given address, the address itself is returned as a string, without double quotes. πŸ™ˆ

ngl the "we couldn't read it so here's the raw address instead, no quotes, no nothing" behaviour is the plot twist of this whole page πŸ’€ both versions do it, so don't be surprised.

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this absolute banger of a manpage came to you from the SystemTap Tapset Reference, version vibes of September 2026 β€” stay quoted, stay printable, mwah πŸ’–πŸŽ€πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from