Changeset View
Changeset View
Standalone View
Standalone View
sys/gdb/gdb_main.c
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | SET_FOREACH(iter, gdb_dbgport_set) { | ||||
dp = *iter; | dp = *iter; | ||||
pri = (dp->gdb_probe != NULL) ? dp->gdb_probe() : -1; | pri = (dp->gdb_probe != NULL) ? dp->gdb_probe() : -1; | ||||
dp->gdb_active = (pri >= 0) ? 0 : -1; | dp->gdb_active = (pri >= 0) ? 0 : -1; | ||||
if (pri > cur_pri) { | if (pri > cur_pri) { | ||||
cur_pri = pri; | cur_pri = pri; | ||||
gdb_cur = dp; | gdb_cur = dp; | ||||
} | } | ||||
} | } | ||||
if (vm_guest != VM_GUEST_HV) { | |||||
if (gdb_cur != NULL) { | if (gdb_cur != NULL) { | ||||
printf("GDB: debug ports:"); | printf("GDB: debug ports:"); | ||||
SET_FOREACH(iter, gdb_dbgport_set) { | SET_FOREACH(iter, gdb_dbgport_set) { | ||||
dp = *iter; | dp = *iter; | ||||
if (dp->gdb_active == 0) | if (dp->gdb_active == 0) | ||||
printf(" %s", dp->gdb_name); | printf(" %s", dp->gdb_name); | ||||
} | } | ||||
printf("\n"); | printf("\n"); | ||||
} else | } else | ||||
printf("GDB: no debug ports present\n"); | printf("GDB: no debug ports present\n"); | ||||
} | |||||
if (gdb_cur != NULL) { | if (gdb_cur != NULL) { | ||||
gdb_cur->gdb_init(); | gdb_cur->gdb_init(); | ||||
if (vm_guest != VM_GUEST_HV) | |||||
printf("GDB: current port: %s\n", gdb_cur->gdb_name); | printf("GDB: current port: %s\n", gdb_cur->gdb_name); | ||||
} | } | ||||
if (gdb_cur != NULL) { | if (gdb_cur != NULL) { | ||||
cur_pri = (boothowto & RB_GDB) ? 2 : 0; | cur_pri = (boothowto & RB_GDB) ? 2 : 0; | ||||
gdb_consinit(); | gdb_consinit(); | ||||
} else | } else | ||||
cur_pri = -1; | cur_pri = -1; | ||||
return (cur_pri); | return (cur_pri); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 879 Lines • Show Last 20 Lines |