Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Psetbkpt.3proc
+++ new/usr/src/man/man3proc/Psetbkpt.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PSETBKPT 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Psetbkpt
19 19 .Nd set a breakpoint trap in a process
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft int
24 25 .Fo Psetbkpt
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "uintptr_t address"
27 28 .Fa "ulong_t *saved"
28 29 .Fc
29 30 .Sh DESCRIPTION
30 31 The
31 32 .Fn Psetbkpt
32 33 function sets a breakpoint instruction at the address
33 34 .Fa address
34 35 in the process handle
35 36 .Fa P .
36 37 The instruction that used to be set will be set in
37 38 .Fa saved
38 39 and should be retained.
39 40 .Pp
40 41 A breakpoint will remain in place until a subsequent call to
41 42 .Xr Pdelbkpt 3PROC .
42 43 The value stored in
43 44 .Fa saved
44 45 should be passed as the third argument to
45 46 .Xr Pdelbkpt 3PROC .
46 47 .Pp
47 48 When a process executes an instruction that has been replaced with a
48 49 breakpoint it generates a
49 50 .Sy FLTBPT
50 51 trap
51 52 causing the thread to stop.
52 53 .Pp
53 54 Note, breakpoints may only be set in active processes.
54 55 They may not be set in process handles that refer to core files, zombie
55 56 processes, or files.
56 57 .Sh RETURN VALUES
57 58 Upon successful completion, the
58 59 .Fn Psetbkpt
59 60 function sets the breakpoint and
60 61 returns
61 62 .Sy 0 .
62 63 Otherwise,
63 64 .Sy -1
64 65 is returned and
65 66 .Sy errno
66 67 is set to indicate the error.
67 68 .Sh ERRORS
68 69 For a full list of possible errors see the
69 70 .Sy DIAGNOSTICS
70 71 section in
71 72 .Xr proc 4 .
72 73 .Pp
73 74 The
74 75 .Fn Psetbkpt
75 76 function will fail if:
76 77 .Bl -tag -width Er
77 78 .It Er ENOENT
78 79 .Fa P
79 80 does not refer to an active process.
80 81 .It Er EBUSY
81 82 A breakpoint instruction was already written by another debugger.
82 83 .El
83 84 .Sh INTERFACE STABILITY
84 85 .Sy Uncommitted
85 86 .Sh MT-LEVEL
86 87 See
87 88 .Sy LOCKING
88 89 in
89 90 .Xr libproc 3LIB .
90 91 .Sh SEE ALSO
91 92 .Xr libproc 3LIB ,
92 93 .Xr Pdelbkpt 3PROC ,
93 94 .Xr proc 4
↓ open down ↓ |
62 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX