This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdbserver vs. serial ports


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]