summaryrefslogtreecommitdiff
path: root/sys/ddb/db_trap.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-04-05 20:05:30 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-04-05 20:05:30 +0000
commiteaeb7c0600085236b26ef8fc62df03ab4c55c09d (patch)
tree7413d30e09485d3c47a87a5c9cab50477df4c455 /sys/ddb/db_trap.c
parent07e72198eed7888a38ff962b06afc2a5131a9641 (diff)
Tell the users what to report when the kernel crashes.
Diffstat (limited to 'sys/ddb/db_trap.c')
-rw-r--r--sys/ddb/db_trap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c
index e2cdd195753..029f564d42f 100644
--- a/sys/ddb/db_trap.c
+++ b/sys/ddb/db_trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trap.c,v 1.5 1997/07/19 22:31:21 niklas Exp $ */
+/* $OpenBSD: db_trap.c,v 1.6 2001/04/05 20:05:29 art Exp $ */
/* $NetBSD: db_trap.c,v 1.9 1996/02/05 01:57:18 christos Exp $ */
/*
@@ -35,6 +35,7 @@
*/
#include <sys/param.h>
#include <sys/proc.h>
+#include <sys/systm.h>
#include <vm/vm.h>
@@ -72,6 +73,13 @@ db_trap(type, code)
db_dot = PC_REGS(DDB_REGS);
db_print_loc_and_inst(db_dot);
+ if (panicstr != NULL) {
+ if (db_print_position() != 0)
+ db_printf("\n");
+ db_printf("Run at least 'trace' and 'ps' and include "
+ "the output when reporting this panic.\n");
+ }
+
db_command_loop();
}