From owner-cvs-all@FreeBSD.ORG Mon Jan 19 23:11:30 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D70C16A4CE; Mon, 19 Jan 2004 23:11:30 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB82A43D3F; Mon, 19 Jan 2004 23:11:28 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i0K7BRtd008190; Tue, 20 Jan 2004 18:11:27 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i0K7BPfe008101; Tue, 20 Jan 2004 18:11:26 +1100 Date: Tue, 20 Jan 2004 18:11:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp In-Reply-To: <200401192127.i0JLRBL3041817@repoman.freebsd.org> Message-ID: <20040120175334.W3279@gamplex.bde.org> References: <200401192127.i0JLRBL3041817@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha support.s src/sys/i386/i386 swtch.s src/sys/kern kern_shutdown.c src/sys/sys systm.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2004 07:11:30 -0000 On Mon, 19 Jan 2004, Poul-Henning Kamp wrote: > phk 2004/01/19 13:27:11 PST > > FreeBSD src repository > > Modified files: > sys/alpha/alpha support.s > sys/i386/i386 swtch.s > sys/kern kern_shutdown.c > sys/sys systm.h > Log: > Add linenumber and source filename to panic(9) output. This was rejected in all reviews. It gives less information than grepping the sources, at some cost (grep at least gives correct line numbers when the sources don't quite match the binary). Please back this out. > Ideally a traceback should be printed too, any takers ? This can be obtained by running a debugger on the panic dump. Line numbers and source file names can also be printed by the debugger if the executable has at least line numbers in its debugging info. I've thought of reducing the bloat for line numbers and source file names in mutex debugging using debugger-like techniques or just a debugger. E.g., mtx_lock_sleep() is now implemented (in the INVARIANTS case) using: void _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line); `file' and `line' here are redundant, since they can be determined from the program counter given enough debugging info (mainly line numbers). Verbose panic messages, and lots of code to print out values of variables just before panicing, are another mistake. Short panic messages were good enough when debuggers were primitive or nonexistent. Verbose panic messages are even less needed now. Bruce