From e15f2a54574c6021558e6f965733e576ed53bc39 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 21 Sep 1993 20:35:36 +0000 Subject: * remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it. --- gdb/remote-utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/remote-utils.c') 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); -- cgit v1.1