From owner-freebsd-current@FreeBSD.ORG Wed Nov 1 16:45:23 2006 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 F00A816A412 for ; Wed, 1 Nov 2006 16:45:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8986B43D46 for ; Wed, 1 Nov 2006 16:45:19 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kA1Gj55a002148; Wed, 1 Nov 2006 11:45:05 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 1 Nov 2006 11:43:08 -0500 User-Agent: KMail/1.9.1 References: <4547F4C9.5020902@elischer.org> In-Reply-To: <4547F4C9.5020902@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611011143.08632.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 01 Nov 2006 11:45:06 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2140/Wed Nov 1 10:52:56 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Julian Elischer Subject: Re: remote gdb, kgdb and ddb X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2006 16:45:24 -0000 On Tuesday 31 October 2006 20:13, Julian Elischer wrote: > it's been a bew years since I did this.. > > some questions.. > > why kgdb instead of gdb -k ? > > for remote, gdb seems to work fine > kgdb -r /dev/cuad0 kernel.debug thinks it's working but seems to get > confused a lot.. No idea, ask marcel perhaps. I only use kgdb on coredumps. > gdb with the following .gdbinit file seems to work as well. > file kernel.debug > set verbose 1 > set remotebreak 1 > set remotebaud 9600 > set remotedevice /dev/cuad0 > target remote /dev/cuad0 > > though I'm not convinced I'm seeing the last frame in which the > trap occurs. (ddb shows one more frame). This is one of the things kgdb fixes (it has frame sniffers for trapframes). > Now that I have my machine in remote gdb, the documentation > (as sparse as it is) doesnt't say how to make the machine reboot. > > from ddb I can do 'call cpu_reset' which seems to work, but > I haven't succedded in making gdb do anything similar, > nor to drop back into ddb. At one stage 'detach' used to do that > but it seems to have stopped working. Try the following from src/tools/debugscripts/gdbinit.kernel: # Switch back to ddb define ddb set boothowto=0x80000000 s end document ddb Switch back to ddb. end I think I used to use that a few years ago. -- John Baldwin