diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index c41fba0..b6f796f 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -57,6 +57,14 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include + +#include +#include + + SYSCTL_NODE(_hw, OID_AUTO, bus, CTLFLAG_RW, NULL, NULL); SYSCTL_NODE(, OID_AUTO, dev, CTLFLAG_RW, NULL, NULL); @@ -542,6 +550,7 @@ devctl_queue_data_f(char *data, int flags) { struct dev_event_info *n1 = NULL, *n2 = NULL; struct proc *p; + char *wp; if (strlen(data) == 0) goto out; @@ -550,6 +559,13 @@ devctl_queue_data_f(char *data, int flags) n1 = malloc(sizeof(*n1), M_BUS, flags); if (n1 == NULL) goto out; + if (n1 == (void *)0xced40080) { + wp = (char *)n1; + wp -= (16 + sizeof(u_long)); + if (db_md_set_watchpoint((u_long)wp, 4) < 0) + panic("could not set watchpoint"); + } + n1->dei_data = data; mtx_lock(&devsoftc.mtx); if (devctl_queue_length == 0) {