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

Function dbg_resume_dbreg

freebsd/arm/arm/debug_monitor.c:1011–1039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009}
1010
1011void
1012dbg_resume_dbreg(void)
1013{
1014 struct dbreg *d;
1015 u_int i;
1016
1017 /*
1018 * This flag is set on the primary CPU
1019 * and its meaning is valid for other CPUs too.
1020 */
1021 if (!dbg_capable())
1022 return;
1023
1024 atomic_thread_fence_acq();
1025
1026 switch (PCPU_GET(dbreg_cmd)) {
1027 case PC_DBREG_CMD_LOAD:
1028 d = (struct dbreg *)PCPU_PTR(dbreg);
1029
1030 /* Restore watchpoints */
1031 for (i = 0; i < dbg_watchpoint_num; i++) {
1032 dbg_wb_write_reg(DBG_REG_BASE_WVR, i, d->dbg_wvr[i]);
1033 dbg_wb_write_reg(DBG_REG_BASE_WCR, i, d->dbg_wcr[i]);
1034 }
1035
1036 PCPU_SET(dbreg_cmd, PC_DBREG_CMD_NONE);
1037 break;
1038 }
1039}

Callers 1

ipi_stopFunction · 0.85

Calls 3

dbg_capableFunction · 0.85
dbg_wb_write_regFunction · 0.70
atomic_thread_fence_acqFunction · 0.50

Tested by

no test coverage detected