* Print a backtrace of the calling thread. The backtrace is generated by * the selected debugger, provided it supports backtraces. If no debugger * is selected or the current debugger does not support backtraces, this * function silently returns. */
| 426 | * function silently returns. |
| 427 | */ |
| 428 | void |
| 429 | kdb_backtrace(void) |
| 430 | { |
| 431 | |
| 432 | if (kdb_dbbe != NULL && kdb_dbbe->dbbe_trace != NULL) { |
| 433 | printf("KDB: stack backtrace:\n"); |
| 434 | kdb_dbbe->dbbe_trace(); |
| 435 | } |
| 436 | #ifdef STACK |
| 437 | else { |
| 438 | struct stack st; |
| 439 | |
| 440 | printf("KDB: stack backtrace:\n"); |
| 441 | stack_zero(&st); |
| 442 | stack_save(&st); |
| 443 | stack_print_ddb(&st); |
| 444 | } |
| 445 | #endif |
| 446 | } |
| 447 | |
| 448 | /* |
| 449 | * Similar to kdb_backtrace() except that it prints a backtrace of an |
no test coverage detected