From 8757a9d181e1dd3c6d9f5f98dfa0c9637927f3f5 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 30 Aug 2015 18:12:53 +0000 Subject: Automatically perform traces upon panic. Shrink message about reporting bugs to pointing at http://www.openbsd.org/ddb.html, because vertical space becomes more precious. ok beck krw kettenis --- sys/ddb/db_trap.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'sys/ddb') diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c index 43f48af74f4..6883b612adc 100644 --- a/sys/ddb/db_trap.c +++ b/sys/ddb/db_trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trap.c,v 1.19 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: db_trap.c,v 1.20 2015/08/30 18:12:52 deraadt Exp $ */ /* $NetBSD: db_trap.c,v 1.9 1996/02/05 01:57:18 christos Exp $ */ /* @@ -69,26 +69,15 @@ db_trap(int type, int code) db_dot = PC_REGS(DDB_REGS); db_print_loc_and_inst(db_dot); - /* - * Just in case we do not have any usable console driver, - * give the user a traceback. - */ - if (cold) { + if (panicstr != NULL) { db_stack_trace_print(db_dot, 0, 10 /* arbitrary */, "", db_printf); - } - if (panicstr != NULL) { if (db_print_position() != 0) db_printf("\n"); - db_printf("RUN AT LEAST 'trace' AND 'ps' AND INCLUDE " - "OUTPUT WHEN REPORTING THIS PANIC!\n"); -#ifdef MULTIPROCESSOR - db_printf("IF RUNNING SMP, USE 'mach ddbcpu <#>' AND " - "'trace' ON OTHER PROCESSORS, TOO.\n"); -#endif - db_printf("DO NOT EVEN BOTHER REPORTING THIS WITHOUT " - "INCLUDING THAT INFORMATION!\n"); + 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"); } db_command_loop(); -- cgit v1.2.3