This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdbserver vs. serial ports
- To: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Subject: Re: gdbserver vs. serial ports
- From: jtc at redback dot com (J.T. Conklin)
- Date: 12 Jul 2001 12:20:04 -0700
- Cc: gdb at sources dot redhat dot com
- References: <20010712112040.A8123@nevyn.them.org>
- Reply-To: jtc at redback dot com
>>>>> "Daniel" == Daniel Jacobowitz <dmj+@andrew.cmu.edu> writes:
Daniel> I don't have a lot of experience with serial programming.
Daniel> Should we be setting VMIN differently, or should we treat
Daniel> read() returning 0 differently? It looks like ser-unix.c
Daniel> treats them read() returning 0 as a timeout and sets VMIN
Daniel> appropriately before calling read(). Which raises the
Daniel> question - does anyone know if gdbserver actually worked over
Daniel> serial ports? :)
The TERMIOS and TERMIO cases put the tty in raw + non blocking mode,
but the SGTTY case only puts the tty in raw mode. It's possible, if
this ever worked, that it was only tested on an very old machine pre-
termios and termio serial disciplines.
Since the current model of gdbserver and the sample gdb stubs do not
make any allowances for timeouts, I think it's reasonable to use the
default VMIN and VTIME, which should result in a blocking read().
If we're really going to support serial i/o in gdbserver, we probably
need to provide options for setting the baud rate, etc.
--jtc
--
J.T. Conklin
RedBack Networks