| 511 | } |
| 512 | |
| 513 | void |
| 514 | db_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 | } |
nothing calls this directly
no test coverage detected