Sun Jan 15 22:18:11 2017 UTC ()
Fix one markup issue and add initial HISTORY section

Import HISTORY notes from FreeBSD.

Sponsored by <The NetBSD Foundation>


(kamil)
diff -r1.55 -r1.56 src/lib/libc/sys/ptrace.2

cvs diff -r1.55 -r1.56 src/lib/libc/sys/ptrace.2 (expand / switch to unified diff)

--- src/lib/libc/sys/ptrace.2 2017/01/14 14:33:18 1.55
+++ src/lib/libc/sys/ptrace.2 2017/01/15 22:18:11 1.56
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: ptrace.2,v 1.55 2017/01/14 14:33:18 wiz Exp $ 1.\" $NetBSD: ptrace.2,v 1.56 2017/01/15 22:18:11 kamil Exp $
2.\" 2.\"
3.\" This file is in the public domain. 3.\" This file is in the public domain.
4.Dd January 14, 2016 4.Dd January 14, 2016
5.Dt PTRACE 2 5.Dt PTRACE 2
6.Os 6.Os
7.Sh NAME 7.Sh NAME
8.Nm ptrace 8.Nm ptrace
9.Nd process tracing and debugging 9.Nd process tracing and debugging
10.Sh LIBRARY 10.Sh LIBRARY
11.Lb libc 11.Lb libc
12.Sh SYNOPSIS 12.Sh SYNOPSIS
13.In sys/types.h 13.In sys/types.h
14.In sys/ptrace.h 14.In sys/ptrace.h
@@ -101,27 +101,27 @@ value set to @@ -101,27 +101,27 @@ value set to
101These events are by default disabled and can be configured with 101These events are by default disabled and can be configured with
102.Dv PT_SET_EVENT_MASK . 102.Dv PT_SET_EVENT_MASK .
103If this event occurs, 103If this event occurs,
104check with 104check with
105.Dv PT_GET_PROCESS_STATE 105.Dv PT_GET_PROCESS_STATE
106the details of the process state associated with this event. 106the details of the process state associated with this event.
107.Pp 107.Pp
108A debugger might reuse a port specific symbols, 108A debugger might reuse a port specific symbols,
109to help writing portable code as described in the port specific part of the 109to help writing portable code as described in the port specific part of the
110.In sys/ptrace.h 110.In sys/ptrace.h
111header. 111header.
112Among these symbols, 112Among these symbols,
113there are: 113there are:
114.Bl -dash -tag 114.Bl -dash
115.It 115.It
116.Dv PTRACE_REG_PC 116.Dv PTRACE_REG_PC
117.It 117.It
118.Dv PTRACE_REG_SET_PC 118.Dv PTRACE_REG_SET_PC
119.It 119.It
120.Dv PTRACE_REG_SP 120.Dv PTRACE_REG_SP
121.It 121.It
122.Dv PTRACE_REG_INTRV 122.Dv PTRACE_REG_INTRV
123.It 123.It
124.Dv PTRACE_BREAKPOINT 124.Dv PTRACE_BREAKPOINT
125.It 125.It
126.Dv PTRACE_BREAKPOINT_SIZE 126.Dv PTRACE_BREAKPOINT_SIZE
127.It 127.It
@@ -694,26 +694,31 @@ attempted to manipulate a process that w @@ -694,26 +694,31 @@ attempted to manipulate a process that w
694.It 694.It
695An attempt was made to use 695An attempt was made to use
696.Dv PT_ATTACH 696.Dv PT_ATTACH
697on a process in violation of the requirements listed under 697on a process in violation of the requirements listed under
698.Dv PT_ATTACH 698.Dv PT_ATTACH
699above. 699above.
700.El 700.El
701.It Bq Er ESRCH 701.It Bq Er ESRCH
702No process having the specified process ID exists. 702No process having the specified process ID exists.
703.El 703.El
704.Sh SEE ALSO 704.Sh SEE ALSO
705.Xr sigaction 2 , 705.Xr sigaction 2 ,
706.Xr signal 7 706.Xr signal 7
 707.Sh HISTORY
 708The
 709.Fn ptrace
 710function appeared in
 711.At v7 .
707.Sh BUGS 712.Sh BUGS
708On the SPARC, the PC is set to the provided PC value for 713On the SPARC, the PC is set to the provided PC value for
709.Dv PT_CONTINUE 714.Dv PT_CONTINUE
710and similar calls, 715and similar calls,
711but the NPC is set willy-nilly to 4 greater than the PC value. 716but the NPC is set willy-nilly to 4 greater than the PC value.
712Using 717Using
713.Dv PT_GETREGS 718.Dv PT_GETREGS
714and 719and
715.Dv PT_SETREGS 720.Dv PT_SETREGS
716to modify the PC, passing 721to modify the PC, passing
717.Li (void *)1 722.Li (void *)1
718to 723to
719.Eo \& 724.Eo \&