diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-21 20:35:36 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-21 20:35:36 +0000 |
commit | e15f2a54574c6021558e6f965733e576ed53bc39 (patch) | |
tree | 4c3b1b8cc53f8d224af71753d0ade8741e495f25 /gdb | |
parent | afa01c54deba6552a785b3066cf5a061eff88917 (diff) | |
download | gdb-e15f2a54574c6021558e6f965733e576ed53bc39.zip gdb-e15f2a54574c6021558e6f965733e576ed53bc39.tar.gz gdb-e15f2a54574c6021558e6f965733e576ed53bc39.tar.bz2 |
* remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/remote-utils.c | 4 | ||||
-rw-r--r-- | gdb/remote.c | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 63e5cb3..aa3fe96 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Tue Sep 21 11:44:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it. + * printcmd.c (print_scalar_formatted): When truncating value we are going to print as unsigned, handle it generally for any length less than sizeof (LONGEST), rather than special-casing sizeof (char), diff --git a/gdb/remote-utils.c b/gdb/remote-utils.c index 290e73f..efe1669 100644 --- a/gdb/remote-utils.c +++ b/gdb/remote-utils.c @@ -183,6 +183,10 @@ gr_open(args, from_tty, gr) SERIAL_RAW (sr_get_desc()); + /* If there is something sitting in the buffer we might take it as a + response to a command, which would be bad. */ + SERIAL_FLUSH_INPUT (sr_get_desc ()); + /* default retries */ if (sr_get_retries() == 0) sr_set_retries(1); diff --git a/gdb/remote.c b/gdb/remote.c index 0f174df..d3fef8b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -302,6 +302,10 @@ device is attached to the remote system (e.g. /dev/ttya)."); SERIAL_RAW (remote_desc); + /* If there is something sitting in the buffer we might take it as a + response to a command, which would be bad. */ + SERIAL_FLUSH_INPUT (remote_desc); + if (from_tty) { puts_filtered ("Remote debugging using "); |