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

Function db_set_thread

freebsd/ddb/db_thread.c:54–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void
55db_set_thread(db_expr_t tid, bool hastid, db_expr_t cnt, char *mod)
56{
57 struct thread *thr;
58 int err;
59
60 if (hastid) {
61 thr = db_lookup_thread(tid, false);
62 if (thr != NULL) {
63 err = kdb_thr_select(thr);
64 if (err != 0) {
65 db_printf("unable to switch to thread %ld\n",
66 (long)thr->td_tid);
67 return;
68 }
69 db_dot = PC_REGS();
70 } else {
71 db_printf("%d: invalid thread\n", (int)tid);
72 return;
73 }
74 }
75
76 db_print_thread();
77 db_print_loc_and_inst(PC_REGS());
78}
79
80void
81db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod)

Callers

nothing calls this directly

Calls 5

db_lookup_threadFunction · 0.85
kdb_thr_selectFunction · 0.85
db_printfFunction · 0.85
db_print_threadFunction · 0.85
db_print_loc_and_instFunction · 0.85

Tested by

no test coverage detected