From owner-freebsd-current@FreeBSD.ORG Wed Nov 10 00:26:02 2004 Return-Path: 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 15B5316A4CE for ; Wed, 10 Nov 2004 00:26:02 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id A756B43D2D for ; Wed, 10 Nov 2004 00:25:59 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id A3D738566B; Wed, 10 Nov 2004 10:55:57 +1030 (CST) Date: Wed, 10 Nov 2004 10:55:57 +1030 From: Greg 'groggy' Lehey To: Alexandre Sunny Kovalenko Message-ID: <20041110002557.GA948@wantadilla.lemis.com> References: <20041030095531.GD2730@eucla.lemis.com> <1099276321.65428.78.camel@palm.tree.com> <20041103085852.GA1199@eucla.lemis.com> <1099585334.59002.16.camel@RabbitsDen> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OLq6itPlQwcDjwuA" Content-Disposition: inline In-Reply-To: <1099585334.59002.16.camel@RabbitsDen> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: FreeBSD current users cc: Stephan Uphoff Subject: Re: Remote gdb broken in -CURRENT? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 00:26:02 -0000 --OLq6itPlQwcDjwuA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thursday, 4 November 2004 at 11:22:14 -0500, Alexandre Sunny Kovalenko wrote: > On Wed, 2004-11-03 at 03:58, Greg 'groggy' Lehey wrote: >> On Sunday, 31 October 2004 at 21:32:01 -0500, Stephan Uphoff wrote: >>> On Sat, 2004-10-30 at 05:55, Greg 'groggy' Lehey wrote: >>>> Is anybody currently using remote gdb kernel debugging in -CURRENT? I >>>> tried yesterday (embarrassingly, during my kernel debug tutorial), and >>>> it looks as if things are broken. >>>> >>>> Specifically, I was doing it in conjunction with firewire. The kernel >>>> was built with 'options GDB', and it showed that the corresponding gdb >>>> functions were included, but the sysctl debug.kdb.available shows only >>>> ddb. I did a bit of looking around for what might have caused it, but >>>> wasn't successful. >>>> >>>> Any ideas? >>> >>> Link dcons directly into the kernel. >> >> That's not the problem. dcons works fine. As I said, it's gdb, not >> firewire. >> >>> ( Does not work as a module. I also link in firewire and >>> dcons_crom). >> >> I don't know what your problem is, but it's a different one. I'll be >> home on Monday and will be able to pay more attention to the issue. > > I would side with previous poster -- in my experience, if you have > machine with no serial ports, you would have to build firewire and dcons > into kernel in order to have GDB listed as output of sysctl > debug.kdb.available (and consequently to use remote debugger ;). Prior > to doing that, I would see message during the boot saying something to > the tune of "No ports available for remote debugging". OK, but this would be a serious bug. > This was true as of few month ago -- since then I have built > firewire/dcons/dcons_crom into the kernel and I've tried it before > writing this E-mail on -current as of 10/31 and it seems to work just > fine. Further information: yes, we can get the sysctl to list gdb as well if we set bit 0x80 on one of the serial port flags (even on machines without serial ports :-). That doesn't help firewire users, though: there's still no way to get it to work over firewire. Summarizing the messages, it seems that some recent change in -CURRENT has broken the recognition of potential remote debugging interfaces. Possibly they only relate to the interfaces which exist at boot time. If this is true, then I'd expect that it would work if we load dcons from loader.conf. I'll take a look at this when I get time, but that may not be for a while. Greg -- See complete headers for address and phone numbers. --OLq6itPlQwcDjwuA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkWAVIubykFB6QiMRAtt4AKCRdKVIQjigt2YUmpWqri8/13ukiwCfZR5i 1XPRRJPXd586u5H8Vux5M38= =2GaB -----END PGP SIGNATURE----- --OLq6itPlQwcDjwuA--