From owner-freebsd-hackers Sat Oct 19 15:50:40 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C820F37B401 for ; Sat, 19 Oct 2002 15:50:38 -0700 (PDT) Received: from conure.mail.pas.earthlink.net (conure.mail.pas.earthlink.net [207.217.120.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 437C943E9C for ; Sat, 19 Oct 2002 15:50:38 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0082.cvx40-bradley.dialup.earthlink.net ([216.244.42.82] helo=mindspring.com) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1832QT-0000e7-00; Sat, 19 Oct 2002 15:50:33 -0700 Message-ID: <3DB1E172.2E30E33D@mindspring.com> Date: Sat, 19 Oct 2002 15:49:22 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: joe Cc: freebsd-hackers@freebsd.org Subject: Re: Trying to write a crash dump -> Trying to debug a kernel panic References: <200210191431.43953.joe@dubium.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG joe wrote: > I am trying to debug a boot time kernel panic. [ ... ] > has gotten me so far, but I am stuck. I can trap and get dumped into > the debugger (I think it's the debugger, the prompt is "db>"). However > I am trying to get a core dump written and that's where I am having no > success. It's not going to happen. > 3) added the following params to the rc.conf file > -- > dumpdir="/var/crash" > dumpdev="/dev/ad0s2b" > ------------- > where dumpdev corresponds to the swap device > the fstab entry corresponds below. > ---- > /dev/ad0s2b none swap sw 0 0 > ------------ Not consulted until after you are booted. > 4) executed the command "dumpon -v /dev/ad0s2b" > 5) rebooted to wwindows You just undid #4. The "dumpon" only lasts as long as you remain booted. As soon as you shutdown to reboot, it's no longer in effect. > 6) rebooted to freeBSD -> panic -> "db> prompt" > > 7) At this point I examined a few commands, (e.g. trace, show reg) > and finished with the "panic" command which according to the > documentation at > > http://www.freebsd.org/doc/en_US.ISO8859-1/ \ > books/developers-handbook/x9854.html > > "This will cause your kernel to dump core and reboot, > so you can later analyze the core on a higher level with gdb. " > > 8) At which the system rebooted and came up, but with no core file That's right. This early in the boot process, you will have to step through the boot using the debugger, until the point it panics. Then you will have to remember where you were one before the panic. Then you can go look at the code, and dump the registers that are meaningful to the place the panic occurred. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message