From owner-freebsd-sparc64@FreeBSD.ORG Mon Nov 3 22:11:14 2008 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2CF11065677 for ; Mon, 3 Nov 2008 22:11:14 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 68D938FC19 for ; Mon, 3 Nov 2008 22:11:14 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id mA3MBBJW008533; Mon, 3 Nov 2008 23:11:11 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id mA3MBBn9008532; Mon, 3 Nov 2008 23:11:11 +0100 (CET) (envelope-from marius) Date: Mon, 3 Nov 2008 23:11:11 +0100 From: Marius Strobl To: Ruben de Groot Message-ID: <20081103221111.GA8256@alchemy.franken.de> References: <20081103120215.GA32257@ei.bzerk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081103120215.GA32257@ei.bzerk.org> User-Agent: Mutt/1.4.2.3i Cc: sparc64@freebsd.org Subject: Re: kgdb on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2008 22:11:14 -0000 On Mon, Nov 03, 2008 at 01:02:15PM +0100, Ruben de Groot wrote: > > Hi, > > After upgrading to 7.1-PRERELEASE last month I'm seeing some > spontaneous reboots with crash dumps on this Netra X1. How > can I debug this as kgdb seems not to be working? > > # uname -r > 7.1-PRERELEASE > # kgdb /usr/obj/usr/src/sys/N4I/kernel.debug /var/crash/vmcore.1 > GNU gdb 6.1.1 [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 "sparc64-marcel-freebsd"...^C > GDB can't read core files on this machine. > I've never had much luck with kgdb(1) on any arch and use devel/gdb53 which still has '-k' instead (for sparc64 just remove the BROKEN from the port Makefile; the problem leading to that one being added was fixed some time a go). For your purposes it's probably simpler to just build a kernel with debugger by adding "options DDB", "options KDB" and "makeoptions DEBUG=-g". Then when the kernel panics just enter "backtrace" on the console. With a X1 you most likely use serial console anyway so you can easily capture the output. Marius