xref: /illumos-gate/usr/src/man/man3proc/Pxecbkpt.3proc (revision c43efa7f6b109f90d7f4962df8c0e1a94008d2d1)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd November 27, 2023
15.Dt PXECBKPT 3PROC
16.Os
17.Sh NAME
18.Nm Pxecbkpt ,
19.Nm Pxecwapt ,
20.Nm Lxecbkpt ,
21.Nm Lxecwapt
22.Nd step over a breakpoint or watchpoint
23.Sh LIBRARY
24.Lb libproc
25.Sh SYNOPSIS
26.In libproc.h
27.Ft int
28.Fo Pxecbkpt
29.Fa "struct ps_prochandle *P"
30.Fa "ulong_t saved"
31.Fc
32.Ft int
33.Fo Pxecwapt
34.Fa "struct ps_prochandle *P"
35.Fa "ulong_t saved"
36.Fc
37.Ft int
38.Fo Lxecbkpt
39.Fa "struct ps_lwphandle *L"
40.Fa "ulong_t saved"
41.Fc
42.Ft int
43.Fo Lxecwapt
44.Fa "struct ps_lwphandle *L"
45.Fa "ulong_t saved"
46.Fc
47.Sh DESCRIPTION
48The
49.Fn Pxecbkpt
50and
51.Fn Pxecwapt
52functions step over a breakpoint or watchpoint respectively in the
53corresponding process handle
54.Fa P .
55The functions execute the original instruction that was at the current
56program counter, provided by
57.Fa saved ,
58and then leave the process stopped at the next instruction.
59.Pp
60The process must be stopped at the time that the
61.Fn Pxecbkpt
62or
63.Fn Pxecwapt
64functions are called.
65.Pp
66The
67.Fn Lxecbkpt
68and
69.Fn Lxecwapt
70functions are identical to
71.Fn Pxecbkpt
72and
73.Fn Pxecwapt ,
74respectively; except rather than operating on the process as a
75whole, they operate on the thread handle
76.Fa L .
77These functions only require that the thread represented by
78.Fa L
79be stopped and not the entire process.
80.Sh RETURN VALUES
81Upon successful completion, the
82.Fn Pxecbkpt ,
83.Fn Pxecwapt ,
84.Fn Lxecbkpt ,
85and
86.Fn Lxecwapt
87functions return
88.Sy 0
89having executed the original instruction at
90.Fa saved .
91Otherwise,
92.Sy -1
93is returned and
94.Sy errno
95is set to indicate the error.
96.Sh ERRORS
97For a full list of errors see the
98.Sy DIAGNOSTICS
99section in
100.Xr proc 5 .
101The
102.Fn Pxecbkpt ,
103.Fn Pxecwapt ,
104.Fn Lxecbkpt ,
105and
106.Fn Lxecwapt
107functions will fail if:
108.Bl -tag -width Er
109.It Er EBUSY
110Either
111.Fa P
112or
113.Fa L
114is not stopped.
115.El
116.Sh INTERFACE STABILITY
117.Sy Uncommitted
118.Sh MT-LEVEL
119See
120.Sy LOCKING
121in
122.Xr libproc 3LIB .
123.Sh SEE ALSO
124.Xr libproc 3LIB ,
125.Xr Pdelbkpt 3PROC ,
126.Xr Pdelwapt 3PROC ,
127.Xr Psetbkpt 3PROC ,
128.Xr Psetwapt 3PROC ,
129.Xr proc 5
130