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/serial.h | |
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/serial.h')
-rw-r--r-- | gdb/serial.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/serial.h b/gdb/serial.h index 630ed43..a9dba27 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -42,6 +42,8 @@ struct serial_ops { int (*readchar) PARAMS ((serial_t, int timeout)); int (*write) PARAMS ((serial_t, const char *str, int len)); int (*flush_output) PARAMS ((serial_t)); + int (*flush_input) PARAMS ((serial_t)); + int (*send_break) PARAMS ((serial_t)); void (*go_raw) PARAMS ((serial_t)); serial_ttystate (*get_tty_state) PARAMS ((serial_t)); int (*set_tty_state) PARAMS ((serial_t, serial_ttystate)); @@ -72,11 +74,23 @@ serial_t serial_fdopen PARAMS ((int fd)); #define SERIAL_FDOPEN(FD) serial_fdopen(FD) -/* Flush pending output. */ +/* Flush pending output. Might also flush input (if this system can't flush + only output). */ #define SERIAL_FLUSH_OUTPUT(SERIAL_T) \ ((SERIAL_T)->ops->flush_output((SERIAL_T))) +/* Flush pending input. Might also flush output (if this system can't flush + only input). */ + +#define SERIAL_FLUSH_INPUT(SERIAL_T)\ + ((*(SERIAL_T)->ops->flush_input) ((SERIAL_T))) + +/* Send a break between 0.25 and 0.5 seconds long. */ + +#define SERIAL_SEND_BREAK(SERIAL_T) \ + ((*(SERIAL_T)->ops->send_break) (SERIAL_T)) + /* Turn the port into raw mode. */ #define SERIAL_RAW(SERIAL_T) (SERIAL_T)->ops->go_raw((SERIAL_T)) |