diff --git a/man2/ptrace.2 b/man2/ptrace.2 index 03b997739..df1be976b 100644 --- a/man2/ptrace.2 +++ b/man2/ptrace.2 @@ -42,7 +42,7 @@ .\" (Thanks to Blaisorblade, Daniel Jacobowitz and others who helped.) .\" 2011-09, major update by Denys Vlasenko .\" -.TH PTRACE 2 2013-01-27 "Linux" "Linux Programmer's Manual" +.TH PTRACE 2 2013-02-16 "Linux" "Linux Programmer's Manual" .SH NAME ptrace \- process trace .SH SYNOPSIS @@ -238,22 +238,23 @@ are not present on all architectures. .BR PTRACE_GETREGSET " (since Linux 2.6.34)" Read the tracee's registers. .I addr -specifies, in an architecture-dependent way, the type of registers to be read. +specifies, in an architecture-dependent way, the type of registers to be read. .B NT_PRSTATUS (with numerical value 1) -usually results in reading of general-purpose registers. If CPU has, for example, +usually results in reading of general-purpose registers. +If the CPU has, for example, floating-point and/or vector registers, they can be retrieved by setting .I addr -to corresponding +to the corresponding .B NT_foo constant. .I data points to a .BR "struct iovec" , -which describes destination buffer's location and length. -On return, kernel modifies +which describes ithe destination buffer's location and length. +On return, the kernel modifies .B iov.len -to indicate actual number of bytes returned. +to indicate the actual number of bytes returned. .TP .BR PTRACE_GETSIGINFO " (since Linux 2.3.99-pre6)" Retrieve information about the signal that caused the stop. @@ -293,7 +294,8 @@ and are not present on all architectures. .TP .BR PTRACE_SETREGSET " (since Linux 2.6.34)" -Modify the tracee's registers. The meaning of +Modify the tracee's registers. +The meaning of .I addr and .I data @@ -559,7 +561,9 @@ supported only on x86. .BR PTRACE_LISTEN " (since Linux 3.4)" Restart the stopped tracee, but prevent it from executing. The resulting state of the tracee is similar to a process which -has been stopped by a SIGSTOP (or other stopping signal). +has been stopped by a +.B SIGSTOP +(or other stopping signal). See the "group-stop" subsection for additional information. .B PTRACE_LISTEN only works on tracees attached by @@ -594,9 +598,10 @@ directly has no such limitation. .\" instead of describing (and needing to support) PTRACE_KILL's quirks.] .TP .BR PTRACE_INTERRUPT " (since Linux 3.4)" -Stop a tracee. If tracee is running, it will stop with +Stop a tracee. +If the tracee is running, it will stop with .BR PTRACE_EVENT_STOP . -If tracee is already stopped by a signal, or receives a signal +If the tracee is already stopped by a signal, or receives a signal in parallel with .BR PTRACE_INTERRUPT , it may report a group-stop @@ -641,7 +646,8 @@ making it a tracee of the calling process. Unlike .BR PTRACE_ATTACH , .B PTRACE_SEIZE -does not stop the process. Only +does not stop the process. +Only a .BR PTRACE_SEIZE d process can accept .B PTRACE_INTERRUPT @@ -1040,7 +1046,7 @@ then it is definitely a group-stop. .B SIGKILL killed the tracee.) .LP -As of kernel 2.6.38, +As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until it restarts or kills it, the tracee will not run, and will not send notifications (except @@ -1063,12 +1069,14 @@ this would cause the .B SIGCONT signals to have no effect on the tracee. .LP -Since kernel 3.4, there is a method to overcome this problem: instead of +Since Linux 3.4, there is a method to overcome this problem: instead of .BR PTRACE_CONT , a .B PTRACE_LISTEN command can be used to restart a tracee in a way where it does not execute, -but waits for a new event which it can report via waitpid (such as when +but waits for a new event which it can report via +.BR waitpid (2) +(such as when it is restarted by a .BR SIGCONT ). .SS PTRACE_EVENT stops @@ -1430,7 +1438,7 @@ and the tracer usually suppresses it, this may cause a stray return from the currently executing system call in the tracee, as described in the "Signal injection and suppression" section. .LP -Since kernel 3.4, +Since Linux 3.4, .B PTRACE_SEIZE can be used instead of .BR PTRACE_ATTACH .