aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-utils.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-09-21 20:35:36 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-09-21 20:35:36 +0000
commite15f2a54574c6021558e6f965733e576ed53bc39 (patch)
tree4c3b1b8cc53f8d224af71753d0ade8741e495f25 /gdb/remote-utils.c
parentafa01c54deba6552a785b3066cf5a061eff88917 (diff)
downloadfsf-binutils-gdb-e15f2a54574c6021558e6f965733e576ed53bc39.zip
fsf-binutils-gdb-e15f2a54574c6021558e6f965733e576ed53bc39.tar.gz
fsf-binutils-gdb-e15f2a54574c6021558e6f965733e576ed53bc39.tar.bz2
* remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it.
Diffstat (limited to 'gdb/remote-utils.c')
-rw-r--r--gdb/remote-utils.c4
1 files changed, 4 insertions, 0 deletions
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);