Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 1999 11:52:39 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        gibbs@narnia.plutotech.com, grog@lemis.com
Cc:        current@FreeBSD.ORG
Subject:   Re: Remote serial gdb--status?
Message-ID:  <199906210152.LAA22100@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906210152.LAA22100>