*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> i386_set_watch (3)              
Title
Content
Arch
Section
 

I386_SET_WATCH(3)

Contents


NAME    [Toc]    [Back]

     i386_clr_watch, i386_set_watch -- manage i386 debug register values

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <machine/reg.h>
     #include <machine/sysarch.h>

     int
     i386_clr_watch(int watchnum, struct dbreg *d);

     int
     i386_set_watch(int watchnum, unsigned int watchaddr, int size,
	 int access, struct dbreg *d);

DESCRIPTION    [Toc]    [Back]

     The i386_clr_watch() function will disable the indicated watch point
     within the specified debug register set.

     The i386_set_watch() function will set up the specified debug registers
     as indicated by the arguments.  The watchnum argument specifies which
     watch register is used, 0, 1, 2, 3, or -1.  If watchnum is -1, a free
     watch register is found and used.	If there are no free watch registers,
     an error code of -1 is returned.  The watchaddr argument specifies the
     watch address, size specifies the size in bytes of the area to be watched
     (1, 2, or 4 bytes), and access specifies the type of watch point:

	   DBREG_DR7_EXEC    An execution breakpoint.
	   DBREG_DR7_WRONLY  Break only when the watch area is written to.
	   DBREG_DR7_RDWR    Break when the watch area is read from or written
			     to.

     Note that these functions do not actually set or clear breakpoints; they
     manipulate the indicated debug register set.  You must use ptrace(2) to
     retrieve and install the debug register values for a process.

RETURN VALUES    [Toc]    [Back]

     The i386_clr_watch() function returns 0 on success, or -1 if watchnum is
     invalid (not in the range of 0-3).

     The i386_set_watch() function will return the watchnum argument, or the
     watchnum actually used in the case that watchnum is -1 on success.  On
     error, i386_set_watch() will return -1 indicating that the watchpoint
     could not be set up because either no more watchpoints are available, or
     watchnum, size, or access is invalid.

SEE ALSO    [Toc]    [Back]

      
      
     ptrace(2), procfs(5)

AUTHORS    [Toc]    [Back]

     This man page was written by Brian S. Dean.


FreeBSD 5.2.1			August 24, 2000 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
i386_set_ioperm NetBSD manage i386 per-process I/O permission bitmap
i386_set_ioperm OpenBSD manage i386 per-process I/O permission bitmap
i386_get_ioperm NetBSD manage i386 per-process I/O permission bitmap
i386_get_ioperm OpenBSD manage i386 per-process I/O permission bitmap
i386_set_ioperm FreeBSD manage per-process access to the i386 I/O port space
i386_get_ioperm FreeBSD manage per-process access to the i386 I/O port space
i386_get_ldt FreeBSD manage i386 per-process Local Descriptor Table entries
i386_get_ldt NetBSD manage i386 per-process Local Descriptor Table entries
i386_set_ldt FreeBSD manage i386 per-process Local Descriptor Table entries
i386_set_ldt NetBSD manage i386 per-process Local Descriptor Table entries
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service