From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 20 08:23:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CECCF16A4CE for ; Tue, 20 Apr 2004 08:23:33 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A5F343D54 for ; Tue, 20 Apr 2004 08:23:33 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i3KFNXti095039; Tue, 20 Apr 2004 08:23:33 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i3KFNXQx004283; Tue, 20 Apr 2004 08:23:33 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i3KFNTDA004282; Tue, 20 Apr 2004 08:23:29 -0700 (PDT) (envelope-from marcel) Date: Tue, 20 Apr 2004 08:23:29 -0700 From: Marcel Moolenaar To: "William M. Grim" Message-ID: <20040420152329.GA4238@dhcp01.pn.xcllnt.net> References: <4084DCB4.9020404@siue.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4084DCB4.9020404@siue.edu> User-Agent: Mutt/1.4.2.1i cc: hackers@freebsd.org Subject: Re: Remote Debugging using GDB on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 15:23:33 -0000 On Tue, Apr 20, 2004 at 03:17:56AM -0500, William M. Grim wrote: > Hi! > > Is it possible to do remote debugging of the FreeBSD kernel over a > serial connection using Linux? FreeBSD has a special "-k" switch that > Linux does not for GDB; so, I'm not even sure it's possible without a > lot of work. Most of the logic is in the gdb stub, which lives in the kernel. You don't have to use -k to be able to remote debug the kernel. It may have to be a cross-debugger (host=*-*-linux*, target=*-*-freebsd*). In principle it should not be necessary, provided the host and target architectures are the same. In short: try it. chances are it works. If not, try with a cross-gdb. HTH, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net