i386_set_watch.3 (84306) | i386_set_watch.3 (108037) |
---|---|
1.\" Copyright (c) 2000 Brian S. Dean 2.\" All rights reserved. 3.\" 4.\" This man-page is based on a similar man-page by Jonathan Lemon 5.\" which is copyrighted under the following conditions: 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" | 1.\" Copyright (c) 2000 Brian S. Dean 2.\" All rights reserved. 3.\" 4.\" This man-page is based on a similar man-page by Jonathan Lemon 5.\" which is copyrighted under the following conditions: 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" |
28.\" $FreeBSD: head/lib/libc/i386/sys/i386_set_watch.3 84306 2001-10-01 16:09:29Z ru $ | 28.\" $FreeBSD: head/lib/libc/i386/sys/i386_set_watch.3 108037 2002-12-18 12:45:11Z ru $ |
29.\" 30.Dd August 24, 2000 31.Os 32.Dt I386_SET_WATCH 3 33.Sh NAME 34.Nm i386_clr_watch , 35.Nm i386_set_watch 36.Nd manage i386 debug register values 37.Sh LIBRARY 38.Lb libc 39.Sh SYNOPSIS 40.In machine/reg.h 41.In machine/sysarch.h 42.Ft int 43.Fn i386_clr_watch "int watchnum" "struct dbreg *d" 44.Ft int 45.Fn i386_set_watch "int watchnum" "unsigned int watchaddr" "int size" "int access" "struct dbreg *d" 46.Sh DESCRIPTION | 29.\" 30.Dd August 24, 2000 31.Os 32.Dt I386_SET_WATCH 3 33.Sh NAME 34.Nm i386_clr_watch , 35.Nm i386_set_watch 36.Nd manage i386 debug register values 37.Sh LIBRARY 38.Lb libc 39.Sh SYNOPSIS 40.In machine/reg.h 41.In machine/sysarch.h 42.Ft int 43.Fn i386_clr_watch "int watchnum" "struct dbreg *d" 44.Ft int 45.Fn i386_set_watch "int watchnum" "unsigned int watchaddr" "int size" "int access" "struct dbreg *d" 46.Sh DESCRIPTION |
47The |
|
47.Fn i386_clr_watch | 48.Fn i386_clr_watch |
49function |
|
48will disable the indicated watch point within the specified debug 49register set. 50.Pp | 50will disable the indicated watch point within the specified debug 51register set. 52.Pp |
53The |
|
51.Fn i386_set_watch | 54.Fn i386_set_watch |
55function |
|
52will set up the specified debug registers as indicated by the 53parameters. The 54.Fa watchnum 55argument specifies which watch register is used, 0, 1, 2, 3, or -1. If 56.Fa watchnum 57is -1, a free watch register is found and used. If there are no free 58watch registers, an error code of -1 is returned. 59.Fa Watchaddr --- 11 unchanged lines hidden (view full) --- 71 to. 72.Ed 73.Pp 74Note that these functions do not actually set or clear breakpoints; 75they manipulate the indicated debug register set. You must use 76.Xr ptrace 2 77to retrieve and install the debug register values for a process. 78.Sh RETURN VALUES | 56will set up the specified debug registers as indicated by the 57parameters. The 58.Fa watchnum 59argument specifies which watch register is used, 0, 1, 2, 3, or -1. If 60.Fa watchnum 61is -1, a free watch register is found and used. If there are no free 62watch registers, an error code of -1 is returned. 63.Fa Watchaddr --- 11 unchanged lines hidden (view full) --- 75 to. 76.Ed 77.Pp 78Note that these functions do not actually set or clear breakpoints; 79they manipulate the indicated debug register set. You must use 80.Xr ptrace 2 81to retrieve and install the debug register values for a process. 82.Sh RETURN VALUES |
83The |
|
79.Fn i386_clr_watch | 84.Fn i386_clr_watch |
85function |
|
80returns 0 on success, or -1 if 81.Fa watchnum 82is invalid (not in the range of 0-3). 83.Pp | 86returns 0 on success, or -1 if 87.Fa watchnum 88is invalid (not in the range of 0-3). 89.Pp |
90The |
|
84.Fn i386_set_watch | 91.Fn i386_set_watch |
92function |
|
85will return the 86.Fa watchnum 87argument, or the watchnum actually used in the case that 88.Fa watchnum 89is -1 on success. On error, 90.Fn i386_set_watch 91will return -1 indicating that the watchpoint could not be set up 92because either no more watchpoints are available, or 93.Fa watchnum , 94.Fa size , 95or 96.Fa access 97is invalid. 98.Sh SEE ALSO 99.Xr ptrace 2 , 100.Xr procfs 5 101.Sh AUTHORS 102This man page was written by 103.An Brian S. Dean . | 93will return the 94.Fa watchnum 95argument, or the watchnum actually used in the case that 96.Fa watchnum 97is -1 on success. On error, 98.Fn i386_set_watch 99will return -1 indicating that the watchpoint could not be set up 100because either no more watchpoints are available, or 101.Fa watchnum , 102.Fa size , 103or 104.Fa access 105is invalid. 106.Sh SEE ALSO 107.Xr ptrace 2 , 108.Xr procfs 5 109.Sh AUTHORS 110This man page was written by 111.An Brian S. Dean . |