FUNCTION::REGISTER(3stap)

πŸ’– FUNCTION::REGISTER πŸ’–

okay bestie, welcome to function::register from the Context Functions part of the SystemTap Tapset Reference (yes that's the manual we're in, hi πŸ‘‹).


✨ NAME ✨

function::register β€” it hands you back the signed value of whichever CPU register you name. that's it. that's the whole job. and it eats. πŸ‘‘


🌸 SYNOPSIS 🌸

register:long(name:string)

πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” the name of the register you want the value of. just the name. drop it in, get your number back, no cap. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this returns the value of the named CPU register as it was saved when the current probe point was hit. like, the frozen-in-amber snapshot of that register at that exact moment. iconic. ✨

and if the register happens to be 32 bits? it gets sign-extended to 64 bits. the glow-up is automatic. πŸ’–


πŸ’œ i386 β€” the names it recognizes πŸ’œ

for the i386 architecture, these are the recognized names. (name1/name2 means name1 and name2 are alternative names for the same register β€” like two stan accounts for one person, iykyk):

eax/ax, ebp/bp, ebx/bx, ecx/cx, edi/di, edx/dx, eflags/flags, eip/ip, esi/si, esp/sp, orig_eax/orig_ax, xcs/cs, xds/ds, xes/es, xfs/fs, xss/ss.


🌈 x86_64 β€” the names it recognizes 🌈

for the x86_64 architecture, here's the whole roster:

  • 64-bit registers: r8, r9, r10, r11, r12, r13, r14, r15, rax/ax, rbp/bp, rbx/bx, rcx/cx, rdi/di, rdx/dx, rip/ip, rsi/si, rsp/sp
  • 32-bit registers: eax, ebp, ebx, ecx, edx, edi, edx, eip, esi, esp, flags/eflags, orig_eax
  • segment registers: xcs/cs, xss/ss
not me pointing out that edx shows up twice in that 32-bit list β€” that's literally what the page says, so we keep it exactly as-is. no editing the source material, periodt. πŸ“

🧚 powerpc β€” the names it recognizes 🧚

for powerpc:

r0, r1, ... r31, nip, msr, orig_gpr3, ctr, link, xer, ccr, softe, trap, dar, dsisr, result.


πŸ“ s390x β€” the names it recognizes πŸ“

for s390x:

r0, r1, ... r15, args, psw.mask, psw.addr, orig_gpr2, ilc, trap.


πŸ’€ AArch64 β€” the names it recognizes πŸ’€

for AArch64:

x0, x1, ... x30, fp, lr, sp, pc, and orig_x0.


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page!! mwah πŸ’‹ this was SystemTap Tapset Reference, version whatever-we-got, dated September 2026 β€” so if you're reading this in the future, hey, slay, you're literally so on time. 🌟 byeeee πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from