diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-13 08:28:11 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-13 08:28:11 +0000 |
commit | 2223ad9f29c5814db092acde717ec2b6862fce5f (patch) | |
tree | 2a466889f6153bad7ad7691eb6fb586ad09ef53f /sys/ddb/db_trap.c | |
parent | 8e89ceca230766363aec9794b7db086ad8b351a2 (diff) |
On show the ps/o output and ddb.html blurb once, so that we don't get them
after each "mach ddbcpu N"
ok miod@ deraadt@
Diffstat (limited to 'sys/ddb/db_trap.c')
-rw-r--r-- | sys/ddb/db_trap.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c index 5575ba21265..0c8cb5adf7c 100644 --- a/sys/ddb/db_trap.c +++ b/sys/ddb/db_trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trap.c,v 1.22 2015/09/12 10:27:45 deraadt Exp $ */ +/* $OpenBSD: db_trap.c,v 1.23 2015/09/13 08:28:10 guenther Exp $ */ /* $NetBSD: db_trap.c,v 1.9 1996/02/05 01:57:18 christos Exp $ */ /* @@ -70,17 +70,24 @@ db_trap(int type, int code) db_print_loc_and_inst(db_dot); if (panicstr != NULL) { - /* show on-proc threads */ - db_show_all_procs(0, 0, 0, "o"); + static int ddb_msg_shown; + + if (! ddb_msg_shown) { + /* show on-proc threads */ + db_show_all_procs(0, 0, 0, "o"); + } /* then the backtrace */ db_stack_trace_print(db_dot, 0, 14 /* arbitrary */, "", db_printf); if (db_print_position() != 0) db_printf("\n"); - db_printf( + if (! ddb_msg_shown) { + db_printf( "http://www.openbsd.org/ddb.html describes the minimum info required in bug\n" "reports. Insufficient info makes it difficult to find and fix bugs.\n"); + ddb_msg_shown = 1; + } } db_command_loop(); |