aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFernando Nasser <fnasser@redhat.com>2001-05-12 21:05:59 +0000
committerFernando Nasser <fnasser@redhat.com>2001-05-12 21:05:59 +0000
commit67dd5ca6911d587bbb65f527c81423d6e535ac5f (patch)
treebd7a5a1e24fced25356403d13c4acf1cb190b05f /gdb
parent8d5ec59972b838fdd5ebe6039b57cb20254a863f (diff)
downloadgdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.zip
gdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.tar.gz
gdb-67dd5ca6911d587bbb65f527c81423d6e535ac5f.tar.bz2
2001-05-12 Fernando Nasser <fnasser@redhat.com>
* remote-e7000.c (e7000_open): Check for bad baud rate. * remote-st.c (st2000_open): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote-e7000.c6
-rw-r--r--gdb/remote-st.c6
3 files changed, 15 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 55cc069..022495d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-12 Fernando Nasser <fnasser@redhat.com>
+
+ * remote-e7000.c (e7000_open): Check for bad baud rate.
+ * remote-st.c (st2000_open): Ditto.
+
2001-05-11 Jim Blandy <jimb@redhat.com>
* thread.c (do_captured_list_thread_ids): Use ui_out_tuple_begin
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 4e7c97c..34ac345 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -667,7 +667,11 @@ e7000_open (char *args, int from_tty)
if (!e7000_desc)
perror_with_name (dev_name);
- SERIAL_SETBAUDRATE (e7000_desc, baudrate);
+ if (SERIAL_SETBAUDRATE (e7000_desc, baudrate))
+ {
+ SERIAL_CLOSE (dev_name);
+ perror_with_name (dev_name);
+ }
SERIAL_RAW (e7000_desc);
#ifdef GDB_TARGET_IS_H8300
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 868c08e..55e1392 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -285,7 +285,11 @@ or target st2000 <host> <port>\n");
if (!st2000_desc)
perror_with_name (dev_name);
- SERIAL_SETBAUDRATE (st2000_desc, baudrate);
+ if (SERIAL_SETBAUDRATE (st2000_desc, baudrate))
+ {
+ SERIAL_CLOSE (dev_name);
+ perror_with_name (dev_name);
+ }
SERIAL_RAW (st2000_desc);