From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: gdbserver vs. serial ports Date: Thu, 12 Jul 2001 12:20:00 -0000 Message-id: <5mbsmqj6or.fsf@jtc.redback.com> References: <20010712112040.A8123@nevyn.them.org> X-SW-Source: 2001-07/msg00119.html >>>>> "Daniel" == Daniel Jacobowitz 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