ptrace.2: NOTES: add "C library/kernel ABI differences" subheading

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-16 08:07:42 +02:00
parent f47eacb5c9
commit 53a99749df
1 changed files with 12 additions and 12 deletions

View File

@ -1926,18 +1926,6 @@ setting unused/ignored arguments to
or
.IR "(void\ *)\ 0".
.LP
At the system call level, the
.BR PTRACE_PEEKTEXT ,
.BR PTRACE_PEEKDATA ,
and
.BR PTRACE_PEEKUSER
requests have a different API: they store the result
at the address specified by the
.I data
parameter, and the return value is the error flag.
The glibc wrapper function provides the API given in DESCRIPTION above,
with the result being returned via the function return value.
.LP
In Linux kernels before 2.6.26,
.\" See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
.BR init (8),
@ -1960,6 +1948,18 @@ Its behavior differs significantly on other flavors of UNIX.
In any case, use of
.BR ptrace ()
is highly specific to the operating system and architecture.
.SS C library/kernel ABI differences
At the system call level, the
.BR PTRACE_PEEKTEXT ,
.BR PTRACE_PEEKDATA ,
and
.BR PTRACE_PEEKUSER
requests have a different API: they store the result
at the address specified by the
.I data
parameter, and the return value is the error flag.
The glibc wrapper function provides the API given in DESCRIPTION above,
with the result being returned via the function return value.
.SH BUGS
On hosts with 2.6 kernel headers,
.B PTRACE_SETOPTIONS