| 303 | } |
| 304 | |
| 305 | void |
| 306 | kdb_cpu_clear_singlestep(void) |
| 307 | { |
| 308 | uint32_t wvr, wcr; |
| 309 | u_int i; |
| 310 | |
| 311 | if (!dbg_capable()) |
| 312 | return; |
| 313 | |
| 314 | dbg_remove_breakpoint(DBG_BKPT_BT_SLOT); |
| 315 | dbg_remove_breakpoint(DBG_BKPT_BNT_SLOT); |
| 316 | |
| 317 | /* Restore all watchpoints */ |
| 318 | for (i = 0; i < dbg_watchpoint_num; i++) { |
| 319 | wcr = dbg_wb_read_reg(DBG_REG_BASE_WCR, i); |
| 320 | wvr = dbg_wb_read_reg(DBG_REG_BASE_WVR, i); |
| 321 | /* Watchpoint considered not empty if address value is not 0 */ |
| 322 | if ((wvr & DBGWVR_ADDR_MASK) != 0) { |
| 323 | dbg_wb_write_reg(DBG_REG_BASE_WCR, i, |
| 324 | (wcr | DBG_WB_CTRL_E)); |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | int |
| 330 | dbg_setup_watchpoint(db_expr_t addr, db_expr_t size, enum dbg_access_t access) |
nothing calls this directly
no test coverage detected