Changeset View
Changeset View
Standalone View
Standalone View
sys/ddb/db_thread.c
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod) | ||||
struct thread *thr; | struct thread *thr; | ||||
thr = kdb_thr_first(); | thr = kdb_thr_first(); | ||||
while (!db_pager_quit && thr != NULL) { | while (!db_pager_quit && thr != NULL) { | ||||
db_printf(" %6ld (%p) (stack %p) ", (long)thr->td_tid, thr, | db_printf(" %6ld (%p) (stack %p) ", (long)thr->td_tid, thr, | ||||
(void *)thr->td_kstack); | (void *)thr->td_kstack); | ||||
prev_jb = kdb_jmpbuf(jb); | prev_jb = kdb_jmpbuf(jb); | ||||
if (setjmp(jb) == 0) { | if (setjmp(jb) == 0) { | ||||
if (thr->td_proc->p_flag & P_INMEM) { | |||||
if (db_trace_thread(thr, 1) != 0) | if (db_trace_thread(thr, 1) != 0) | ||||
db_printf("***\n"); | db_printf("***\n"); | ||||
} else | |||||
db_printf("*** swapped out\n"); | |||||
} | } | ||||
kdb_jmpbuf(prev_jb); | kdb_jmpbuf(prev_jb); | ||||
thr = kdb_thr_next(thr); | thr = kdb_thr_next(thr); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Lookup a thread based on a db expression address. We assume that the | * Lookup a thread based on a db expression address. We assume that the | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |