diff options
Diffstat (limited to 'sys/ddb/db_main.c')
-rw-r--r-- | sys/ddb/db_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ddb/db_main.c b/sys/ddb/db_main.c index 0a9fbf7..e63b4fc0 100644 --- a/sys/ddb/db_main.c +++ b/sys/ddb/db_main.c @@ -194,6 +194,7 @@ db_trap(int type, int code) jmp_buf jb; void *prev_jb; boolean_t bkpt, watchpt; + const char *why; /* * Don't handle the trap if the console is unavailable (i.e. it @@ -222,6 +223,8 @@ db_trap(int type, int code) db_printf("Stopped at\t"); db_print_loc_and_inst(db_dot); } + why = kdb_why; + db_script_kdbenter(why != KDB_WHY_UNSET ? why : "unknown"); db_command_loop(); (void)kdb_jmpbuf(prev_jb); } |