From owner-freebsd-hackers Tue Nov 9 9:45: 2 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 40D59150BB for ; Tue, 9 Nov 1999 09:44:41 -0800 (PST) (envelope-from grog@mojave.sitaranetworks.com) Received: from mojave.sitaranetworks.com ([199.103.141.157]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id EAA11466 for ; Wed, 10 Nov 1999 04:14:35 +1030 (CST) (envelope-from grog@mojave.sitaranetworks.com) Message-ID: <19991109103938.63558@mojave.sitaranetworks.com> Date: Tue, 9 Nov 1999 10:39:38 -0500 From: Greg Lehey To: Zhihui Zhang , freebsd-hackers@FreeBSD.ORG Subject: Re: How to use gdb to catch a panic Reply-To: Greg Lehey References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: ; from Zhihui Zhang on Tue, Nov 09, 1999 at 08:52:58AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 9 November 1999 at 8:52:58 -0500, Zhihui Zhang wrote: > > I have set up an environment of remote serial debugging on FreeBSD > 3.3-Release. I have a program that whenever it runs the kernel panics. > Is there any way I can use remote serial debugging to trace this panic > process instead of examining a dead kernel (i.e., coredump)? Yes. > Or, is there any way I can use to drop the debugged kernel to debugger > mode whenever it runs a certain piece of code? Yes. That's what breakpoints are for. If you set a breakpoint on panic, you'll go into the debugger. But you don't need that, since you go into the debugger on panic anyway. If you're expecting a breakpoint or panic, and you want to do it in gdb as opposed to ddb, set gdb mode ahead of time. This is also useful for debugging ddb :-) Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message