* Similar to kdb_backtrace() except that it prints a backtrace of an * arbitrary thread rather than the calling thread. */
| 450 | * arbitrary thread rather than the calling thread. |
| 451 | */ |
| 452 | void |
| 453 | kdb_backtrace_thread(struct thread *td) |
| 454 | { |
| 455 | |
| 456 | if (kdb_dbbe != NULL && kdb_dbbe->dbbe_trace_thread != NULL) { |
| 457 | printf("KDB: stack backtrace of thread %d:\n", td->td_tid); |
| 458 | kdb_dbbe->dbbe_trace_thread(td); |
| 459 | } |
| 460 | #ifdef STACK |
| 461 | else { |
| 462 | struct stack st; |
| 463 | |
| 464 | printf("KDB: stack backtrace of thread %d:\n", td->td_tid); |
| 465 | if (stack_save_td(&st, td) == 0) |
| 466 | stack_print_ddb(&st); |
| 467 | } |
| 468 | #endif |
| 469 | } |
| 470 | |
| 471 | /* |
| 472 | * Set/change the current backend. |
no test coverage detected