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

Function _db_stack_trace_all

freebsd/ddb/db_command.c:847–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847static void
848_db_stack_trace_all(bool active_only)
849{
850 struct thread *td;
851 jmp_buf jb;
852 void *prev_jb;
853
854 for (td = kdb_thr_first(); td != NULL; td = kdb_thr_next(td)) {
855 prev_jb = kdb_jmpbuf(jb);
856 if (setjmp(jb) == 0) {
857 if (td->td_state == TDS_RUNNING)
858 db_printf("\nTracing command %s pid %d"
859 " tid %ld td %p (CPU %d)\n",
860 td->td_proc->p_comm, td->td_proc->p_pid,
861 (long)td->td_tid, td, td->td_oncpu);
862 else if (active_only)
863 continue;
864 else
865 db_printf("\nTracing command %s pid %d"
866 " tid %ld td %p\n", td->td_proc->p_comm,
867 td->td_proc->p_pid, (long)td->td_tid, td);
868 if (td->td_proc->p_flag & P_INMEM)
869 db_trace_thread(td, -1);
870 else
871 db_printf("--- swapped out\n");
872 if (db_pager_quit) {
873 kdb_jmpbuf(prev_jb);
874 return;
875 }
876 }
877 kdb_jmpbuf(prev_jb);
878 }
879}
880
881static void
882db_stack_trace_active(db_expr_t dummy, bool dummy2, db_expr_t dummy3,

Callers 2

db_stack_trace_activeFunction · 0.85
db_stack_trace_allFunction · 0.85

Calls 6

kdb_thr_firstFunction · 0.85
kdb_thr_nextFunction · 0.85
kdb_jmpbufFunction · 0.85
setjmpFunction · 0.85
db_printfFunction · 0.85
db_trace_threadFunction · 0.50

Tested by

no test coverage detected