This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
gdbserver vs. serial ports
- To: gdb at sources dot redhat dot com
- Subject: gdbserver vs. serial ports
- From: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Date: Thu, 12 Jul 2001 11:20:40 -0700
I see that in remote-utils.c, we deliberately set VMIN and VTIME to 0 if we
open a serial port. On an i386-linux (2.4) host, this has the effect of
making read() return 0 if no data is available. We see the 0 and
immediately decide that it's an EOF, and close/reopen the serial port.
I don't have a lot of experience with serial programming. Should we be
setting VMIN differently, or should we treat read() returning 0 differently?
It looks like ser-unix.c treats them read() returning 0 as a timeout and
sets VMIN appropriately before calling read(). Which raises the question -
does anyone know if gdbserver actually worked over serial ports? :)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer