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

Function kdb_init

freebsd/kern/subr_kdb.c:513–542  ·  view source on GitHub ↗

* Initialize the kernel debugger interface. */

Source from the content-addressed store, hash-verified

511 * Initialize the kernel debugger interface.
512 */
513void
514kdb_init(void)
515{
516 struct kdb_dbbe *be, **iter;
517 int cur_pri, pri;
518
519 kdb_active = 0;
520 kdb_dbbe = NULL;
521 cur_pri = -1;
522 SET_FOREACH(iter, kdb_dbbe_set) {
523 be = *iter;
524 pri = (be->dbbe_init != NULL) ? be->dbbe_init() : -1;
525 be->dbbe_active = (pri >= 0) ? 0 : -1;
526 if (pri > cur_pri) {
527 cur_pri = pri;
528 kdb_dbbe = be;
529 }
530 }
531 if (kdb_dbbe != NULL) {
532 printf("KDB: debugger backends:");
533 SET_FOREACH(iter, kdb_dbbe_set) {
534 be = *iter;
535 if (be->dbbe_active == 0)
536 printf(" %s", be->dbbe_name);
537 }
538 printf("\n");
539 printf("KDB: current backend: %s\n",
540 kdb_dbbe->dbbe_name);
541 }
542}
543
544/*
545 * Handle contexts.

Callers 13

i386_kdb_initFunction · 0.85
mips_initFunction · 0.85
platform_startFunction · 0.85
platform_startFunction · 0.85
platform_startFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
mips_initFunction · 0.85
amd64_kdb_initFunction · 0.85
initarmFunction · 0.85

Calls 1

printfFunction · 0.70

Tested by

no test coverage detected