Skip to content

Conversation

Justus2308
Copy link
Contributor

Resolves #24982

First commit fixes a bug introduced by myself in #24921 by adding a missing @enumFromInt to the std.posix.ptrace .darwin prong. Also the else prong didn't really make sense there and wouldn't compile anyway as it was so I added explicit ptrace support for BSDs and compile errors for everything else.
Sources:
https://man7.org/linux/man-pages/man2/ptrace.2.html
https://man.dragonflybsd.org/?command=ptrace&section=2
https://man.freebsd.org/cgi/man.cgi?query=ptrace
https://man.netbsd.org/ptrace.2
https://man.openbsd.org/ptrace.2
https://github.com/SerenityOS/serenity/blob/502caef9a40bccc7459f9835f2174a601106299a/Userland/Libraries/LibC/sys/ptrace.h

https://docs.oracle.com/cd/E36784_01/html/E36874/ptrace-3c.html
https://smartos.org/man/3C/ptrace
(specifically the part about ptrace not being a real syscall + only existing on 32-bit systems)

Second commit adds some more ptrace-related constants to std.os.linux.
Source: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ptrace.h?h=v6.17-rc5

@alexrp alexrp self-assigned this Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing PTRACE_SETOPTIONS option values
2 participants