From owner-freebsd-stable@FreeBSD.ORG Tue Aug 2 21:13:48 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA95216A41F for ; Tue, 2 Aug 2005 21:13:48 +0000 (GMT) (envelope-from mitch@kuoi.asui.uidaho.edu) Received: from kuoi.asui.uidaho.edu (kuoi.asui.uidaho.edu [129.101.191.123]) by mx1.FreeBSD.org (Postfix) with SMTP id 5DF2F43D46 for ; Tue, 2 Aug 2005 21:13:48 +0000 (GMT) (envelope-from mitch@kuoi.asui.uidaho.edu) Received: (qmail 70062 invoked by uid 1010); 2 Aug 2005 21:13:47 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Aug 2005 21:13:47 -0000 Date: Tue, 2 Aug 2005 14:13:47 -0700 (PDT) From: Mitch Parks To: dpk In-Reply-To: <20050802133920.J64406@shared10.hosting.flyingcroc.net> Message-ID: <20050802141148.W871@kuoi.asui.uidaho.edu> References: <20050802133920.J64406@shared10.hosting.flyingcroc.net> X-Radio: KUOI MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-stable@freebsd.org Subject: Re: Kernel debugging, 5.4-RELEASE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 21:13:48 -0000 man kgdb http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html On Tue, 2 Aug 2005, dpk wrote: > What method do kernel developers employ to debug kernel panics? The gdb > that comes with 5.4-RELEASE does not have kernel debugging support and the > handbook appears to be out of date with regards to KDB. > > I'm trying to use another gdb, out of ports, that has kernel debugging > support but I'm getting the following results: > > /usr/ports/devel/gdb6/work/gdb+dejagnu-20040810/gdb/gdb -k kernel.debug > GNU gdb 20040810 [GDB v6.x for FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-portbld-freebsd5.4"... > (kgdb) target remote /dev/cuaa0 > Remote debugging using /dev/cuaa0 > 0xc035646c in kdb_enter () > warning: Unable to find dynamic linker breakpoint function. > GDB will be unable to debug shared library initializers > and track explicitly loaded dynamic code. > warning: shared library handler failed to enable breakpoint > (kgdb) bt > #0 0xc035646c in kdb_enter () > #1 0xc033ea1f in panic () > #2 0xc0333181 in lockmgr () > #3 0xc038b08b in vop_stdunlock () > #4 0xc038af3b in vop_defaultop () > #5 0xc03010bb in spec_vnoperate () > #6 0xc0301648 in spec_write () > etc > > IE, it's not giving me any argument information. > > The target machine was booted with kernel.debug, an unstripped kernel > built with -g. What additional steps do the kernel developers take to get > the arguments? > > (Unfortunately I cannot get this machine to dump core to swap, so it has > to be done over remote) man kgdb http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html mitch@uidaho.edu