mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-14 19:38:01 +08:00
* remote-mips.c (mips_initialize): Clear mips_initializing via
cleanup chain, not directly. * ser-unix.c (wait_for) [HAVE_TERMIO, HAVE_TERMIOS]: Make a timeout of -1 mean forever, like in the HAVE_SGTTY case. Warn if we are munging the timeout due to the limited range of c_cc[VTIME].
This commit is contained in:
@ -435,11 +435,41 @@ wait_for(scb, timeout)
|
||||
fprintf_unfiltered(gdb_stderr, "get_tty_state failed: %s\n", safe_strerror(errno));
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
state.termios.c_cc[VTIME] = timeout * 10;
|
||||
if (timeout < 0)
|
||||
{
|
||||
/* No timeout. */
|
||||
state.termios.c_cc[VTIME] = 0;
|
||||
state.termios.c_cc[VMIN] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.termios.c_cc[VMIN] = 0;
|
||||
state.termios.c_cc[VTIME] = timeout * 10;
|
||||
if (state.termios.c_cc[VTIME] != timeout * 10)
|
||||
{
|
||||
warning ("Timeout value %d too large, using %d", timeout,
|
||||
state.termios.c_cc[VTIME] / 10);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TERMIO
|
||||
state.termio.c_cc[VTIME] = timeout * 10;
|
||||
if (timeout < 0)
|
||||
{
|
||||
/* No timeout. */
|
||||
state.termio.c_cc[VTIME] = 0;
|
||||
state.termio.c_cc[VMIN] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.termio.c_cc[VMIN] = 0;
|
||||
state.termio.c_cc[VTIME] = timeout * 10;
|
||||
if (state.termio.c_cc[VTIME] != timeout * 10)
|
||||
{
|
||||
warning ("Timeout value %d too large, using %d", timeout,
|
||||
state.termio.c_cc[VTIME] / 10);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
scb->current_timeout = timeout;
|
||||
|
Reference in New Issue
Block a user