From owner-cvs-src Thu Feb 13 9:35: 0 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9249A37B401; Thu, 13 Feb 2003 09:34:58 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD3A943F93; Thu, 13 Feb 2003 09:34:56 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id EAA21217; Fri, 14 Feb 2003 04:34:46 +1100 Date: Fri, 14 Feb 2003 04:35:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Aurelien Nephtali Cc: Peter Wemm , , , Subject: Re: cvs commit: src/sys/kern kern_shutdown.c In-Reply-To: <20030213125204.GA12333@nebula.wanadoo.fr> Message-ID: <20030214041205.X4349-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 13 Feb 2003, Aurelien Nephtali wrote: > It could be good now to log the backtrace :/ > When one occurs it goes nowhere so if you cannot copy it on the moment, it is > lost forever (without talking about stopping the console and using Page UP and > Page Down). Only the LOR is logged + 'Stack backtrace:'. db_print_backtrace() never really worked, since ddb uses db_printf() but ordinary printf() should be used (except when db_print_backtrace() is actually from within ddb). Workaround: use a serial console. I think the correct fix is to replace db_printf() by printf(). printf() can decide what to do more easily than callers of *printf() can (by checking db_active). This would also avoid the once common error of calling printf() instead of db_printf() from ddb commands, and make printf() work right when it is called from functions that are called from within ddb using ddb's call command (printf() should act like db_printf() then). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message