summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorbsd <bsd@FreeBSD.org>2000-09-21 17:07:27 +0000
committerbsd <bsd@FreeBSD.org>2000-09-21 17:07:27 +0000
commit878d7f2499e7a2f9817e11c882877596b0ef8ec5 (patch)
tree1e10e525ea67fc28583a774db85425af9d2c0b27 /sys/amd64/include
parenta5b979afa0926873efe5f134b465efa9a2002dc6 (diff)
downloadFreeBSD-src-878d7f2499e7a2f9817e11c882877596b0ef8ec5.zip
FreeBSD-src-878d7f2499e7a2f9817e11c882877596b0ef8ec5.tar.gz
Add a couple of debug register helper functions to assist in setting
and clearing watchpoints. Reviewed by: jwd@FreeBSD.org, -hackers@
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/reg.h6
-rw-r--r--sys/amd64/include/sysarch.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h
index 6effd1a..47856a3 100644
--- a/sys/amd64/include/reg.h
+++ b/sys/amd64/include/reg.h
@@ -132,6 +132,12 @@ struct dbreg {
unsigned int dr7; /* debug control register */
};
+#define DBREG_DR7_EXEC 0x00 /* break on execute */
+#define DBREG_DR7_WRONLY 0x01 /* break on write */
+#define DBREG_DR7_RDWR 0x03 /* break on read or write */
+#define DBREG_DRX(d,x) ((&d->dr0)[x]) /* reference dr0 - dr7 by
+ register number */
+
#ifdef _KERNEL
/*
diff --git a/sys/amd64/include/sysarch.h b/sys/amd64/include/sysarch.h
index 01e63c5..7e355af 100644
--- a/sys/amd64/include/sysarch.h
+++ b/sys/amd64/include/sysarch.h
@@ -68,6 +68,7 @@ struct i386_vm86_args {
#include <sys/cdefs.h>
union descriptor;
+struct dbreg;
__BEGIN_DECLS
int i386_get_ldt __P((int, union descriptor *, int));
@@ -75,6 +76,9 @@ int i386_set_ldt __P((int, union descriptor *, int));
int i386_get_ioperm __P((unsigned int, unsigned int *, int *));
int i386_set_ioperm __P((unsigned int, unsigned int, int));
int i386_vm86 __P((int, void *));
+int i386_set_watch __P((int watchnum, unsigned int watchaddr, int size,
+ int access, struct dbreg * d));
+int i386_clr_watch __P((int watchnum, struct dbreg * d));
__END_DECLS
#endif
OpenPOWER on IntegriCloud