* remote.c, remote-utils.c: Use SERIAL_FLUSH_INPUT after opening it.
[deliverable/binutils-gdb.git] / gdb / remote-utils.c
index 290e73fceb9a71d90055e37d6f210d7e34ab974a..efe166958d99303362bb503471c60b167dc36ecb 100644 (file)
@@ -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);
This page took 0.022555 seconds and 4 git commands to generate.