aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-mon.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-mon.c')
-rw-r--r--gdb/remote-mon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/remote-mon.c b/gdb/remote-mon.c
index 115822b..4552cca 100644
--- a/gdb/remote-mon.c
+++ b/gdb/remote-mon.c
@@ -341,11 +341,13 @@ general_open(args, name, from_tty)
if (monitor_desc == NULL)
perror_with_name(dev_name);
- /* The baud rate was specified when GDB was started. */
- if (SERIAL_SETBAUDRATE (monitor_desc, sr_get_baud_rate()))
+ if (baud_rate != -1)
{
- SERIAL_CLOSE (monitor_desc);
- perror_with_name (name);
+ if (SERIAL_SETBAUDRATE (monitor_desc, baud_rate))
+ {
+ SERIAL_CLOSE (monitor_desc);
+ perror_with_name (name);
+ }
}
SERIAL_RAW(monitor_desc);