* Enter the currently selected debugger. If a message has been provided, * it is printed first. If the debugger does not support the enter method, * it is entered by using breakpoint(), which enters the debugger through * kdb_trap(). The 'why' argument will contain a more mechanically usable * string than 'msg', and is relied upon by DDB scripting to identify the * reason for entering the de
| 495 | * reason for entering the debugger so that the right script can be run. |
| 496 | */ |
| 497 | void |
| 498 | kdb_enter(const char *why, const char *msg) |
| 499 | { |
| 500 | |
| 501 | if (kdb_dbbe != NULL && kdb_active == 0) { |
| 502 | if (msg != NULL) |
| 503 | printf("KDB: enter: %s\n", msg); |
| 504 | kdb_why = why; |
| 505 | breakpoint(); |
| 506 | kdb_why = KDB_WHY_UNSET; |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | /* |
| 511 | * Initialize the kernel debugger interface. |
no test coverage detected