regs_query_register_offset(9)
π regs_query_register_offset β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual era π this one's a tiny little function with main character energy and honestly? it's giving "short but essential." let's get into it π«Ά
πΈ NAME πΈ
regs_query_register_offset β literally just query a register offset from its name, that's the whole vibe π
β¨ SYNOPSIS β¨
int regs_query_register_offset (const char *name );
that's it. that's the whole thing. one argument, one int back, no cap π₯
π¦ ARGUMENTS π¦
nameβ the name of a register π« like, the string version of it. you hand over the name, the function does the rest. iykyk.
π DESCRIPTION π
okay so here's the tea β regs_query_register_offset returns the offset of a register in struct pt_regs from its name. so you give it a name, and it tells you where that register lives inside struct pt_regs β offset style π iconic behaviour, honestly.
but listen π if the name is invalid, this returns -EINVAL; like, it's not gonna guess for you bestie, invalid name = -EINVAL, periodt π
no vibes-based guessing here β feed it a bad name and you're getting -EINVAL back, end of story π
π SEE ALSO π
- Kernel file
./arch/x86/kernel/ptrace.c regs_query_register_name(9)β the matching bestie to this one, go check it out π§
and that's the whole page, bestie!! go forth and query those offsets π
πΈ sign-off time πΈ this little gem comes from ./arch/x86/kernel, dated October 2026, and it's filed under regs_query_register_offset(9) β slay, documented, done πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms