MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_find_watchpoint

Function db_find_watchpoint

freebsd/ddb/db_watch.c:247–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245
246#ifdef notused
247static bool
248db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs)
249{
250 db_watchpoint_t watch;
251 db_watchpoint_t found = 0;
252
253 for (watch = db_watchpoint_list;
254 watch != 0;
255 watch = watch->link)
256 if (db_map_equal(watch->map, map)) {
257 if ((watch->loaddr <= addr) &&
258 (addr < watch->hiaddr))
259 return (true);
260 else if ((trunc_page(watch->loaddr) <= addr) &&
261 (addr < round_page(watch->hiaddr)))
262 found = watch;
263 }
264
265 /*
266 * We didn't hit exactly on a watchpoint, but we are
267 * in a protected region. We want to single-step
268 * and then re-protect.
269 */
270
271 if (found) {
272 db_watchpoints_inserted = false;
273 db_single_step(regs);
274 }
275
276 return (false);
277}
278#endif
279
280/* Delete hardware watchpoint */

Callers

nothing calls this directly

Calls 1

db_map_equalFunction · 0.85

Tested by

no test coverage detected