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

Function kdb_cpu_clear_singlestep

freebsd/arm/arm/debug_monitor.c:305–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305void
306kdb_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
329int
330dbg_setup_watchpoint(db_expr_t addr, db_expr_t size, enum dbg_access_t access)

Callers

nothing calls this directly

Calls 4

dbg_capableFunction · 0.85
dbg_remove_breakpointFunction · 0.85
dbg_wb_read_regFunction · 0.70
dbg_wb_write_regFunction · 0.70

Tested by

no test coverage detected