From owner-freebsd-arch@FreeBSD.ORG Tue Jul 6 05:33:53 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1191716A4CE for ; Tue, 6 Jul 2004 05:33:53 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74AD443D2F for ; Tue, 6 Jul 2004 05:33:52 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from dhcp50.pn.xcllnt.net (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i665Xqw9054805 for ; Mon, 5 Jul 2004 22:33:52 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp50.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11) with ESMTP id i665XpMn062096 for ; Mon, 5 Jul 2004 22:33:52 -0700 (PDT) (envelope-from marcel@dhcp50.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i665XpkB062095 for arch@FreeBSD.org; Mon, 5 Jul 2004 22:33:51 -0700 (PDT) (envelope-from marcel) Date: Mon, 5 Jul 2004 22:33:51 -0700 From: Marcel Moolenaar To: arch@FreeBSD.org Message-ID: <20040706053351.GA62046@dhcp50.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Please review: revamp of kernel debugging code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 05:33:53 -0000 Gang, I reworked the kernel debugging support to achieve the following: 1. Allow any device to be used as debug port, not just sio(4). This is required on platforms that don't support sio(4). Such as ia64. 2. Unify the remote GDB stubs and improve remote debugging. This applies to sparc64 and ia64. 3. Improve speed of remote GDB by implementing compression. This is pretty much required on ia64, where the register context is 9KB. 3. Add thread awareness to both remote GDB and DDB. This includes the ability to switch the active thread and provide backtraces for them. 4. Remove the NO_SIO option added on alpha to work around console braindeadness. Alpha now looks like a normal platform :-) 5. Detangle remote GDB support from DDB code to allow only remote GDB to be configured, but not DDB (and obviously vice versa). This also allows other debugger implementations to be added. 6. Improve symbol handling in DDB, especially for the pre-linker case. I probably forgot some items, but you get the gist. The patch applies to alpha, amd64, i386, ia64 and sparc64. amd64 is known to compile but I can't test this stuff yet due to lack of hardware. Typically you'll see that #ifdef DDB is being replaced with #ifdef KDB. This is because DDB indicates whether you want the DDB debugger, but not having DDB doesn't mean that there isn't any debugger at all. So a new option KDB as been added to indicate that certain debugging code should be compiled in. Please apply the patch and try it out. Note that the patch is quite large (~363KB), so http://people.freebsd.org/~marcel/gdb.diff I'll probably commit it in about a week or so if there aren't any showshopper issues. FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net