From owner-freebsd-current Sun Jun 20 18:52:50 1999 Delivered-To: freebsd-current@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id E865E14C88 for ; Sun, 20 Jun 1999 18:52:46 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id LAA22100; Mon, 21 Jun 1999 11:52:39 +1000 Date: Mon, 21 Jun 1999 11:52:39 +1000 From: Bruce Evans Message-Id: <199906210152.LAA22100@godzilla.zeta.org.au> To: gibbs@narnia.plutotech.com, grog@lemis.com Subject: Re: Remote serial gdb--status? Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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. 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-( Designating a port for low-level "console" i/o (flags 0x40) currently makes it unavailable for ordinary console i/o (flags 0x10) and debugging (flags 0x80). I think this is a bug. Go back a couple of versions if you want to use flags (0x40 | 0x80). I think the problem with "high" speeds is caused by the low-level console driver doesn't initialise the UART's (receiver) fifo. The siocn i/o routines are unbuffered, but gdb apparently requires some buffering, and a 16-character fifo apparently provides enough buffering. It's surprising that the unbuffered routines work at all. The output routine busy-waits until everything is sent, so sending large packets would break receiving large packets. To use gdb on a normal port (except while booting), stty the port to the same settings as gdb is using. This annulls the context switching in the siocn i/o routines (they switch the context on every character so that debugging using ddb works evern if the port is being probed, but this doesn't work for gdb since its i/o isn't one character at a time). The sio probe and attach routines should handle the gdb port like they handle the console port. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message