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

Function db_set_temp_breakpoint

freebsd/ddb/db_break.c:213–232  ·  view source on GitHub ↗

* Set a temporary breakpoint. * The instruction is changed immediately, * so the breakpoint does not have to be on the breakpoint list. */

Source from the content-addressed store, hash-verified

211 * so the breakpoint does not have to be on the breakpoint list.
212 */
213db_breakpoint_t
214db_set_temp_breakpoint(db_addr_t addr)
215{
216 register db_breakpoint_t bkpt;
217
218 bkpt = db_breakpoint_alloc();
219 if (bkpt == 0) {
220 db_printf("Too many breakpoints.\n");
221 return 0;
222 }
223
224 bkpt->map = NULL;
225 bkpt->address = addr;
226 bkpt->flags = BKPT_TEMP;
227 bkpt->init_count = 1;
228 bkpt->count = 1;
229
230 BKPT_WRITE(bkpt->address, &bkpt->bkpt_inst);
231 return bkpt;
232}
233
234void
235db_delete_temp_breakpoint(db_breakpoint_t bkpt)

Callers 1

db_set_single_stepFunction · 0.85

Calls 2

db_breakpoint_allocFunction · 0.85
db_printfFunction · 0.85

Tested by

no test coverage detected