arch_has_single_step(9)
π arch_has_single_step β a little kernel API manual moment, section 9, bestie
okay so we're in the Kernel API Manual, section 9, and today's main character is arch_has_single_step. she's short, she's sweet, she's a preprocessor-level vibe check. let's get into it π
β¨ NAME β¨
arch_has_single_step β literally just answers the question: does this CPU support user-mode single-step? that's it. that's the whole thing. π¦
πΈ SYNOPSIS πΈ
arch_has_single_step
no args, no flags, no drama. she just is. π
π DESCRIPTION π
okay so here's the tea, bestie π β if this thing is defined, then there must be function declarations or inlines for user_enable_single_step and user_disable_single_step. like, that's the deal. no cap. if you define the macro, you gotta bring her two friends along too, periodt.
and arch_has_single_step should evaluate to nonzero iff the machine supports instruction single-step for user mode. yes, that's "if and only if" β she's precise like that. π
the way that it can be a constant... or it can test a CPU feature bit. either one, queen's choice. π
π«Ά reminder: nonzero = yes she can, zero = no she can't. don't come for me, that's just what the manpage says.
π₯ SEE ALSO π₯
- Kernel file
./include/linux/ptrace.hβ the source of truth, go read it iykyk π ptrace_may_access(9)ptrace_parent(9)ptrace_event_enabled(9)ptrace_event(9)ptrace_event_pid(9)ptrace_init_task(9)ptrace_release_task(9)user_enable_single_step(9)user_disable_single_step(9)arch_has_block_step(9)user_enable_block_step(9)arch_ptrace_stop_needed(9)arch_ptrace_stop(9)ptrace_report_syscall_permit_entry(9)ptrace_report_syscall_exit(9)
like, the whole ptrace friend group showed up to the party π literally every single one of them, we love a supportive squad.
and that's the page, bestie π§ from ./include/linux, dated October 2026, and yes β arch_has_single_step(9) says hi from the footer too. mwah π β π
π¦ 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