diff options
Diffstat (limited to 'gdb/remote-utils.c')
-rw-r--r-- | gdb/remote-utils.c | 4 |
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); |