From 3bf57d210832b28e9361990830eb722a619f031b Mon Sep 17 00:00:00 2001 From: "gdb-2.8" Date: Sat, 3 Sep 1988 08:00:00 +0100 Subject: gdb-2.8 --- gdb/remote.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'gdb/remote.c') diff --git a/gdb/remote.c b/gdb/remote.c index 23f27df..27a7322 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -71,11 +71,24 @@ anyone else from sharing it farther. Help stamp out software hoarding! #include "frame.h" #include "inferior.h" -#include +#include "wait.h" #include #include #include + +#ifdef HAVE_TERMIO +#include +#undef TIOCGETP +#define TIOCGETP TCGETA +#undef TIOCSETN +#define TIOCSETN TCSETA +#undef TIOCSETP +#define TIOCSETP TCSETAF +#define TERMINAL struct termio +#else #include +#define TERMINAL struct sgttyb +#endif int kiodebug; @@ -101,7 +114,7 @@ remote_open (name, from_tty) char *name; int from_tty; { - struct sgttyb sg; + TERMINAL sg; remote_debugging = 0; dcache_init (); @@ -111,7 +124,11 @@ remote_open (name, from_tty) perror_with_name (name); ioctl (remote_desc, TIOCGETP, &sg); +#ifdef HAVE_TERMIO + sg.c_lflag &= ~ICANON; +#else sg.sg_flags = RAW; +#endif ioctl (remote_desc, TIOCSETP, &sg); if (from_tty) @@ -165,18 +182,17 @@ remote_resume (step, signal) int remote_wait (status) - union wait *status; + WAITTYPE *status; { char buf[PBUFSIZ]; - status->w_status = 0; + WSETEXIT ((*status), 0); getpkt (buf); if (buf[0] == 'E') error ("Remote failure reply: %s", buf); if (buf[0] != 'S') error ("Invalid remote reply: %s", buf); - status->w_stopval = WSTOPPED; - status->w_stopsig = (fromhex (buf[1]) << 4) + fromhex (buf[2]); + WSETSTOP ((*status), (((fromhex (buf[1])) << 4) + (fromhex (buf[2])))); } /* Read the remote registers into the block REGS. */ -- cgit v1.1