From owner-freebsd-current@FreeBSD.ORG Fri Aug 26 14:24:56 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3BF916A41F for ; Fri, 26 Aug 2005 14:24:56 +0000 (GMT) (envelope-from Lonnie.Vanzandt@ngc.com) Received: from xcgca810.northgrum.com (xcgca810.northgrum.com [208.12.122.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 464CA43D46 for ; Fri, 26 Aug 2005 14:24:55 +0000 (GMT) (envelope-from Lonnie.Vanzandt@ngc.com) Received: from xcgca800.northgrum.com ([157.127.103.70]) by xcgca810.northgrum.com with InterScan Messaging Security Suite; Fri, 26 Aug 2005 07:24:54 -0700 Received: from xcgco501.northgrum.com ([158.114.104.53]) by xcgca800.northgrum.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 26 Aug 2005 07:24:54 -0700 Received: from [192.168.217.128] ([158.114.106.12]) by xcgco501.northgrum.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 26 Aug 2005 08:24:28 -0600 From: Lonnie VanZandt Organization: Northrop Grumman To: freebsd-current@freebsd.org Date: Fri, 26 Aug 2005 08:24:49 -0600 User-Agent: KMail/1.8.1 References: <20050826132035.8496.qmail@istanbul.enderunix.org> <6.2.3.4.0.20050826092853.07535d20@64.7.153.2> <20050826133650.9496.qmail@istanbul.enderunix.org> In-Reply-To: <20050826133650.9496.qmail@istanbul.enderunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508260824.50152.lonnie.vanzandt@ngc.com> X-OriginalArrivalTime: 26 Aug 2005 14:24:28.0023 (UTC) FILETIME=[DDC97870:01C5AA49] Subject: Re: cuaa0 or cuad0? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lonnie.vanzandt@ngc.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2005 14:24:56 -0000 fyi, the handbook is now outdated. The instructions therein applied up to 5.2 (perhaps even to 5.3 but I didn't have to do a remote debug session in 5.3). Most of it remains pertinent but the host-side gdb application was switched to "kgdb". If you want to debug a remote target instead of a local running or core dumped kernel, your command-line options are: kgdb -r The handbook instructions about sio flags (0x80) for the target remain correct. The target kernel also must have "options DDB", "options KDB", and "options GDB" in its configuration. I run my com ports at 9600-8-N-1. Perhaps this can be increased on each side... To connect the host and the target, enter kdb/ddb on the target (sysctl, keystroke, or panic), then type "gdb" on the target, then "s" on the target. Now, on the host, run the kgdb command with the proper paths to your com port and your kernel image. It should connect (if not, make sure you used a null-modem cable between the systems!) To get the proper symbol table information for kgdb, sometime while the target is still up, run "asf" (see the man page for this) to output the add-symbol-file commands for any loaded modules. (The format of these commands changed a wee bit from 5.2 to 5.4 so asf helps to get the syntax and addresses correct.) You can then "source asf.out" on the host kgdb session to load in your symbol tables. You'll need copies of the modules from the target on the host side too. You can get remote kernel debugging to work - just be aware that none of the existant documentation really covers the scenario well. It all seems to focus on the "debug a core from a local kernel, single-system" use case... On Friday 26 August 2005 07:36 am, Omer Faruk Sen wrote: > root@balli# dumpon -v /dev/ad0s1b > kernel dumps on /dev/ad0s1b > > And I have read > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kernel >d ebug-online-gdb.html > and I think this page should be updated. -k option on gdb is invalid and I > assume I should kgdb command directly. > > Mike Tancsa writes: > > At 09:20 AM 26/08/2005, Omer Faruk Sen wrote: > >> By the way whatever I do with dumpdev on rc.conf. I couldn't get a crash > >> dump on my /var/crash. What I do is to just enable dumpdev="/dev/ad0s1b" > >> and dumpdir="/var/crash". Am I missing something? I have used 6.0BETA3 > >> and 6.0BETA2 GENERIC kernels for debugging, > > > > Do you have enough swap ? What happens if you do > > dumpon -v /dev/ad0s1b > > > > does it complain ? > > > > ---Mike > > > >> ----------------------- > >> Omer Faruk Sen > >> http://www.EnderUNIX.ORG > >> Software Development Team @ Turkey > >> http://www.Faruk.NET > >> For Public key: http://www.enderunix.org/ofsen/ofsen.asc > >> ******************************************************** > >> > >> First Turkish Qmail book is out! Go check it. > >> Duydunuz mu! Turkiye'nin ilk Qmail kitabi cikti. > >> http://www.acikakademi.com/catalog/qmail/ > >> _______________________________________________ > >> freebsd-current@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >> To unsubscribe, send any mail to > >> "freebsd-current-unsubscribe@freebsd.org" > > > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to > > "freebsd-current-unsubscribe@freebsd.org" > > ----------------------- > Omer Faruk Sen > http://www.EnderUNIX.ORG > Software Development Team @ Turkey > http://www.Faruk.NET > For Public key: http://www.enderunix.org/ofsen/ofsen.asc > ******************************************************** > > > First Turkish Qmail book is out! Go check it. > Duydunuz mu! Turkiye'nin ilk Qmail kitabi cikti. > http://www.acikakademi.com/catalog/qmail/ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"