From owner-freebsd-current Sun Jun 20 17:47:43 1999 Delivered-To: freebsd-current@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 6DAF91525A for ; Sun, 20 Jun 1999 17:47:29 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id KAA06750; Mon, 21 Jun 1999 10:17:30 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id KAA45473; Mon, 21 Jun 1999 10:17:36 +0930 (CST) Date: Mon, 21 Jun 1999 10:17:36 +0930 From: Greg Lehey To: "Justin T. Gibbs" Cc: current@FreeBSD.org Subject: Re: Remote serial gdb--status? Message-ID: <19990621101736.Y6820@freebie.lemis.com> References: <19990618114450.Q9893@freebie.lemis.com> <199906210013.SAA00602@narnia.plutotech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199906210013.SAA00602@narnia.plutotech.com>; from Justin T. Gibbs on Sun, Jun 20, 1999 at 06:13:19PM -0600 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 20 June 1999 at 18:13:19 -0600, Justin T. Gibbs wrote: > In article <19990621091742.U6820@freebie.lemis.com> you wrote: >> >> In fact, it was all OK. The serial port seems to be flaky. It works >> OK at 9600 bps, but drops characters at 38400. I'm still >> investigating whether this is hardware or software: it seems to work >> fine in normal mode, but when it's in serial debug mode it can often >> drop two characters at a time, and there's no overrun indication. > > It looks like isa/sio.c still won't allow you to set a port as both > a low-level console and the gdb port. I could not get remote gdb > to work correctly after the sio probe without designating the port > for low-level console I/O. Now that I've done that, I can't debug > at 115200 any more. Interesting. I think there must be something wrong with the interface Are some interrupts getting through, for example? The debugging interface uses programmed I/O, but when characters get lost, there should be an overrun indication, and I test for that and find none. Here's an example of what I'm logging: Correct (9600 bps): +$Hc-1#09 +$qOffsets#4b +$?#3f +$Hg0#df +$g#67 +$mc027e0e4,4#f7 +$mc026b458,8#cf +$mc026b460,8#c8 +$mc026b468,8#d0 +$mc026b470,8#c9 +$mc027e0e4,4#f7 +$mc026b458,8#cf +$mc026b460,8#c8 +$mc026b468,8#d0 +$mc026b470,8#c9 +$mc0215df8,1#f7 +$mc0215df8,1#f7 +$mc0215df9,1#f8 +$mc0215dfa,1#20 +$mc0215dfb,1#21 +$mc0215dfc,1#22 +$mc0215dfb,1#21 +$mc0215dfb,1#21 +$mc0215dfb,1#21 +$mc027e0dc,4#25 +$mc027e0e0,4#f3 +$mc027e0e0,4#f3 +$mc027e108,4#c7 +$mc027e10c,4#f2 +$mc027e100,4#bf +$mc027e104,4#c3 +$mc027e104,4#c3 +$mc027e128,4#c9 +$mc027e12c,4#f4 +$mc027e130,4#c2 +$mc027e120,4#c1 +$mc027e124,4#c5 +$mc027e124,4#c5 +$mc027e144,4#c7 +$mc027e148,4#cb +$mc027e13c,4#f5 +$mc027e140,4#c3 +$mc027e140,4#c3 +$mc027e154,50#f9 +$mc027e14c,4#f6 +$Hc0#db +$c#63 Incorrect (38400 bps): +$Hc-1#09 +$qOffsets#4b +$?#3f +$Hg0#df +$g#67 +$mc027e0e4,4#f7 +$mc026b458,8#cf +$mc0b460,8#c8$mc026b460,8#c8 See this? It corresponds to +$mc026b460,8#c8 in the correct example. It dropped 2 characters in the address, then retried. What doesn't show is that I check for overrun in the status register, and it never shows. You'll see a *lot* of errors of this kind in the stuff below. These two examples were generated from the same input to gdb. +$mc026b468,8#d0 +$mc026b470,8#c9 +$mc027e0e4,4#f7 +$mc026b8,8#cf$mc026b458,8#cf +$mc026b460,8#c8 +$mc026b468,8#d0 +$mc026b470,8#c9 +$mc0215df8#f7$mc0215df8,1#f7 +$mc0215df8,1#f7 +$mc0215df9,1#f8 +$mc0215dfa,1#20 +$mc0215dfb,1#1$mc0215dfb,1#21$mc0215dfb,1#21 +$mc0215dfc,1#22 +$mc0215dfb,1#21 +$mc0215dfb,1#21 +c0215dfb,1#21$mc0215dfb,1#21 +$mc027e0dc,4#25 +$mc027e0e0,4#f3 +$mc027e0e0,4#f3 +$mc7e108,4#c7$mc027e108,4#c7 +$mc027e10c,4#f2 +$mc027e100,4#bf +$mc027e104,4#c3 +$mc02704,4#c3$mc027e104,4#c3 +$mc027e128,4#c9 +$mc027e12c,4#f4 +$mc027e130,4#c2 +$mc027e124#c1$mc027e120,4#c1 +$mc027e124,4#c5 +$mc027e124,4#c5 +$mc027e144,4#c7 +$mc027e148,4b$mc027e148,4#cb$mc027e148,4#cb +$mc027e13c,4#f5 +$mc027e140,4#c3 +$mc027e140,4#c3 +$mc027e154,4#c8 +$mc027e14c,4#f6 +$Hc0#db +$c#63 > 38400 seems to work for me, but that is with only minimal testing. > Who broke remote debugging in sio? This is a critical tool we can't > afford to have broken... 8-( I have had this kind of problem since day one, just sometimes it's better, sometimes it's worse. I think that there may have been some problems with the new version of gdb (4.18), which at least initially had much larger timeouts. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message