aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorgdb-2.8 <gdb@fsf.org>1988-09-03 08:00:00 +0100
committerPedro Alves <palves@redhat.com>2012-06-03 15:36:31 +0100
commit3bf57d210832b28e9361990830eb722a619f031b (patch)
treeba506d293bde0f6500d0cee3e643ebf8890d9cf7 /gdb/remote.c
parent7c75bab3d3ef344a6a0b13b9ab59ecd5855aceb5 (diff)
downloadgdb-3bf57d210832b28e9361990830eb722a619f031b.zip
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.gz
gdb-3bf57d210832b28e9361990830eb722a619f031b.tar.bz2
gdb-2.8
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c28
1 files changed, 22 insertions, 6 deletions
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 <sys/wait.h>
+#include "wait.h"
#include <sys/ioctl.h>
#include <a.out.h>
#include <sys/file.h>
+
+#ifdef HAVE_TERMIO
+#include <termio.h>
+#undef TIOCGETP
+#define TIOCGETP TCGETA
+#undef TIOCSETN
+#define TIOCSETN TCSETA
+#undef TIOCSETP
+#define TIOCSETP TCSETAF
+#define TERMINAL struct termio
+#else
#include <sgtty.h>
+#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. */