From c20c1bdf992a90db69c4abb73594b2ff58154ef6 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Sat, 26 Feb 1994 01:52:39 +0000 Subject: * remote.c, remote-mon.c, remote-utils.c, remote-utils.h, target.h, remote-es.c, remote-nindy.c: Don't set baud rate if baud_rate is -1. Remove sr_get_baud_rate and sr_set_baud_rate; just use the global variable itself. When printing baud rate, don't print a baud rate if baud_rate is -1. --- gdb/remote-mon.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdb/remote-mon.c') 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); -- cgit v1.1