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

Function db_findstack_cmd

freebsd/ddb/db_ps.c:513–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513void
514db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused,
515 char *dummy4 __unused)
516{
517 struct thread *td;
518 vm_offset_t saddr;
519
520 if (have_addr)
521 saddr = addr;
522 else {
523 db_printf("Usage: findstack <address>\n");
524 return;
525 }
526
527 for (td = kdb_thr_first(); td != NULL; td = kdb_thr_next(td)) {
528 if (kstack_contains(td, saddr, 1)) {
529 db_printf("Thread %p\n", td);
530 return;
531 }
532 }
533}

Callers

nothing calls this directly

Calls 4

db_printfFunction · 0.85
kdb_thr_firstFunction · 0.85
kdb_thr_nextFunction · 0.85
kstack_containsFunction · 0.85

Tested by

no test coverage detected