Improve ptrace docs

This commit is contained in:
Peter Limkilde Svendsen
2026-04-08 22:36:19 +02:00
parent d6261d3868
commit 74c6e48a8f
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
//! `ptrace.h` implementation.
//! `sys/ptrace.h` implementation.
//!
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man2/ptrace.2.html>.
@@ -26,6 +26,7 @@ pub const PTRACE_SYSEMU: c_int = 31;
pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 32;
// Can't use "params: ..." syntax, because... guess what? Cbingen again :(
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man2/ptrace.2.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ptrace(request: c_int, mut __valist: ...) -> c_int {
// Musl also just grabs the arguments from the varargs...
+2
View File
@@ -3,7 +3,9 @@ use crate::{
platform::{Pal, types::*},
};
/// Platform abstraction for `ptrace` functionality.
pub trait PalPtrace: Pal {
/// Platform implementation of [`ptrace()`](crate::header::sys_ptrace::ptrace) from [`sys/ptrace.h`](crate::header::sys_ptrace).
unsafe fn ptrace(
request: c_int,
pid: pid_t,