[RFA] Set VMIN to 1 in termio/termios cases

Daniel Jacobowitz dmj+@andrew.cmu.edu
Thu Jul 12 12:26:00 GMT 2001


Rather than going with the default timeouts, this matches what ser-unix does
if no timeout is requested - I can't see gdbserver wanting a timeout, as it
has no UI.  My limited testing shows that this works correctly.  Is this OK?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

2001-07-12  Daniel Jacobowitz  <drow@mvista.com>

	* gdbserver/remote-utils.c (remote_open):  Set VMIN to 1
	in HAVE_TERMIO/HAVE_TERMIOS cases.

--- gdb-5.0/gdb/gdbserver/remote-utils.c.orig	Thu Jul 12 11:26:56 2001
+++ gdb-5.0/gdb/gdbserver/remote-utils.c	Thu Jul 12 11:23:05 2001
@@ -61,7 +61,7 @@
 	termios.c_lflag = 0;
 	termios.c_cflag &= ~(CSIZE | PARENB);
 	termios.c_cflag |= CLOCAL | CS8;
-	termios.c_cc[VMIN] = 0;
+	termios.c_cc[VMIN] = 1;
 	termios.c_cc[VTIME] = 0;
 
 	tcsetattr (remote_desc, TCSANOW, &termios);
@@ -78,7 +78,7 @@
 	termio.c_lflag = 0;
 	termio.c_cflag &= ~(CSIZE | PARENB);
 	termio.c_cflag |= CLOCAL | CS8;
-	termio.c_cc[VMIN] = 0;
+	termio.c_cc[VMIN] = 1;
 	termio.c_cc[VTIME] = 0;
 
 	ioctl (remote_desc, TCSETA, &termio);



More information about the Gdb-patches mailing list