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

Function dbg_find_free_slot

freebsd/arm/arm/debug_monitor.c:495–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495static u_int
496dbg_find_free_slot(enum dbg_t type)
497{
498 u_int max, i;
499
500 switch(type) {
501 case DBG_TYPE_BREAKPOINT:
502 max = dbg_breakpoint_num;
503 break;
504 case DBG_TYPE_WATCHPOINT:
505 max = dbg_watchpoint_num;
506 break;
507 default:
508 db_printf("Unsupported debug type\n");
509 return (~0U);
510 }
511
512 for (i = 0; i < max; i++) {
513 if (dbg_check_slot_free(type, i))
514 return (i);
515 }
516
517 return (~0U);
518}
519
520static u_int
521dbg_find_slot(enum dbg_t type, db_expr_t addr)

Callers 1

dbg_setup_xpointFunction · 0.70

Calls 2

db_printfFunction · 0.85
dbg_check_slot_freeFunction · 0.85

Tested by

no test coverage detected