| 245 | |
| 246 | #ifdef notused |
| 247 | static bool |
| 248 | db_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 */ |
nothing calls this directly
no test coverage detected