diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-28 06:45:35 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-07-28 06:45:35 +0000 |
commit | 704deef2c0830b00aca6614989cf7944b38ebeba (patch) | |
tree | 8faf989eee64b6419088445e6e4587246f389b6c /gdb/ser-unix.c | |
parent | 157ea89d778f04125d60b9d2d8a80831b632bb38 (diff) | |
download | gdb-704deef2c0830b00aca6614989cf7944b38ebeba.zip gdb-704deef2c0830b00aca6614989cf7944b38ebeba.tar.gz gdb-704deef2c0830b00aca6614989cf7944b38ebeba.tar.bz2 |
* serial.h, ser-{unix,go32,tcp}.c: Add flush_input and send_break.
* nindy-share/*, remote-nindy.c: Extensive hacking to make it
conform to GDB conventions like using memcpy not bcopy, serial.h,
etc. This is to make it host on Solaris, AIX, etc.
* Makefile.in: Reflect removed nindy-share files.
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r-- | gdb/ser-unix.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 5f07ade..1f8d738 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -326,6 +326,46 @@ hardwire_flush_output (scb) #endif } +static int +hardwire_flush_input (scb) + serial_t scb; +{ +#ifdef HAVE_TERMIOS + return tcflush (scb->fd, TCIFLUSH); +#endif + +#ifdef HAVE_TERMIO + return ioctl (scb->fd, TCFLSH, 0); +#endif + +#ifdef HAVE_SGTTY + /* This flushes both input and output, but we can't do better. */ + return ioctl (scb->fd, TIOCFLUSH, 0); +#endif +} + +static int +hardwire_send_break (scb) + serial_t scb; +{ + int status; + +#ifdef HAVE_TERMIOS + return tcsendbreak (scb->fd, 0); +#endif + +#ifdef HAVE_TERMIO + return ioctl (scb->fd, TCSBRK, 0); +#endif + +#ifdef HAVE_SGTTY + status = ioctl (scb->fd, TIOCSBRK, 0); + usleep (250000); + status = ioctl (scb->fd, TIOCCBRK, 0); + return status; +#endif +} + static void hardwire_raw(scb) serial_t scb; @@ -607,6 +647,8 @@ static struct serial_ops hardwire_ops = hardwire_readchar, hardwire_write, hardwire_flush_output, + hardwire_flush_input, + hardwire_send_break, hardwire_raw, hardwire_get_tty_state, hardwire_set_tty_state, |