Lines Matching refs:watch
61 static void db_watchpoint_free(db_watchpoint_t watch);
74 db_watchpoint_t watch; in db_watchpoint_alloc() local
76 if ((watch = db_free_watchpoints) != 0) { in db_watchpoint_alloc()
77 db_free_watchpoints = watch->link; in db_watchpoint_alloc()
78 return (watch); in db_watchpoint_alloc()
84 watch = db_next_free_watchpoint; in db_watchpoint_alloc()
87 return (watch); in db_watchpoint_alloc()
91 db_watchpoint_free(db_watchpoint_t watch) in db_watchpoint_free() argument
93 watch->link = db_free_watchpoints; in db_watchpoint_free()
94 db_free_watchpoints = watch; in db_watchpoint_free()
100 db_watchpoint_t watch; in db_set_watchpoint() local
111 for (watch = db_watchpoint_list; in db_set_watchpoint()
112 watch != 0; in db_set_watchpoint()
113 watch = watch->link) in db_set_watchpoint()
114 if (db_map_equal(watch->map, map) && in db_set_watchpoint()
115 (watch->loaddr == addr) && in db_set_watchpoint()
116 (watch->hiaddr == addr+size)) { in db_set_watchpoint()
121 watch = db_watchpoint_alloc(); in db_set_watchpoint()
122 if (watch == 0) { in db_set_watchpoint()
127 watch->map = map; in db_set_watchpoint()
128 watch->loaddr = addr; in db_set_watchpoint()
129 watch->hiaddr = addr+size; in db_set_watchpoint()
131 watch->link = db_watchpoint_list; in db_set_watchpoint()
132 db_watchpoint_list = watch; in db_set_watchpoint()
140 db_watchpoint_t watch; in db_delete_watchpoint() local
144 (watch = *prev) != 0; in db_delete_watchpoint()
145 prev = &watch->link) in db_delete_watchpoint()
146 if (db_map_equal(watch->map, map) && in db_delete_watchpoint()
147 (watch->loaddr <= addr) && in db_delete_watchpoint()
148 (addr < watch->hiaddr)) { in db_delete_watchpoint()
149 *prev = watch->link; in db_delete_watchpoint()
150 db_watchpoint_free(watch); in db_delete_watchpoint()
160 db_watchpoint_t watch; in db_list_watchpoints() local
172 for (watch = db_watchpoint_list; in db_list_watchpoints()
173 watch != 0; in db_list_watchpoints()
174 watch = watch->link) in db_list_watchpoints()
180 db_map_current(watch->map) ? "*" : " ", in db_list_watchpoints()
181 (void *)watch->map, (long)watch->loaddr, in db_list_watchpoints()
182 (long)watch->hiaddr - (long)watch->loaddr); in db_list_watchpoints()
225 db_watchpoint_t watch; in db_set_watchpoints() local
228 for (watch = db_watchpoint_list; in db_set_watchpoints()
229 watch != 0; in db_set_watchpoints()
230 watch = watch->link) in db_set_watchpoints()
231 pmap_protect(watch->map->pmap, in db_set_watchpoints()
232 trunc_page(watch->loaddr), in db_set_watchpoints()
233 round_page(watch->hiaddr), in db_set_watchpoints()
250 db_watchpoint_t watch; in db_find_watchpoint() local
253 for (watch = db_watchpoint_list; in db_find_watchpoint()
254 watch != 0; in db_find_watchpoint()
255 watch = watch->link) in db_find_watchpoint()
256 if (db_map_equal(watch->map, map)) { in db_find_watchpoint()
257 if ((watch->loaddr <= addr) && in db_find_watchpoint()
258 (addr < watch->hiaddr)) in db_find_watchpoint()
260 else if ((trunc_page(watch->loaddr) <= addr) && in db_find_watchpoint()
261 (addr < round_page(watch->hiaddr))) in db_find_watchpoint()
262 found = watch; in db_find_watchpoint()