summaryrefslogtreecommitdiff
path: root/gdb/rdi-share
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2000-01-11 03:07:37 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2000-01-11 03:07:37 +0000
commite31cf3b5740670d856962824e983e893aca5acd0 (patch)
tree0c7f4b3102340776bf12f87c2f4666874ba618ab /gdb/rdi-share
parentefbdfc61a9659829f2e641021240cecd2fc0f414 (diff)
downloadgdb-e31cf3b5740670d856962824e983e893aca5acd0.tar.gz
import gdb-2000-01-10 snapshot
Diffstat (limited to 'gdb/rdi-share')
-rw-r--r--gdb/rdi-share/serdrv.c26
-rw-r--r--gdb/rdi-share/unixcomm.c12
2 files changed, 29 insertions, 9 deletions
diff --git a/gdb/rdi-share/serdrv.c b/gdb/rdi-share/serdrv.c
index 0765107a2bd..a8e89ca4de5 100644
--- a/gdb/rdi-share/serdrv.c
+++ b/gdb/rdi-share/serdrv.c
@@ -8,8 +8,8 @@
/* -*-C-*-
*
- * $Revision: 1.4 $
- * $Date: 1999/01/28 03:50:16 $
+ * $Revision: 1.6 $
+ * $Date: 2000/01/06 14:01:53 $
*
*
* serdrv.c - Synchronous Serial Driver for Angel.
@@ -32,6 +32,8 @@
#include "params.h"
#include "logging.h"
+extern int baud_rate; /* From gdb/top.c */
+
#ifdef COMPILING_ON_WINDOWS
# undef ERROR
# undef IGNORE
@@ -83,8 +85,11 @@ static struct writestate wstate;
* The set of parameter options supported by the device
*/
static unsigned int baud_options[] = {
-#ifdef __hpux
- 115200, 57600,
+#ifdef B115200 || __hpux
+ 115200,
+#endif
+#ifdef B57600 || __hpux
+ 57600,
#endif
38400, 19200, 9600
};
@@ -229,6 +234,12 @@ static int SerialOpen(const char *name, const char *arg)
printf( "could not understand baud rate %s\n", arg );
#endif
}
+ else if (baud_rate > 0)
+ {
+ /* If the user specified a baud rate on the command line "-b" or via
+ the "set remotebaud" command then try to use that one */
+ process_baud_rate( baud_rate );
+ }
#ifdef COMPILING_ON_WINDOWS
{
@@ -514,6 +525,13 @@ static int find_baud_rate( unsigned int *speed )
} possibleBaudRates[] = {
#if defined(__hpux)
{115200,_B115200}, {57600,_B57600},
+#else
+#ifdef B115200
+ {115200,B115200},
+#endif
+#ifdef B57600
+ {57600,B57600},
+#endif
#endif
#ifdef COMPILING_ON_WINDOWS
{38400,CBR_38400}, {19200,CBR_19200}, {9600, CBR_9600}, {0,0}
diff --git a/gdb/rdi-share/unixcomm.c b/gdb/rdi-share/unixcomm.c
index cbca5e3cdd4..ce3333918a4 100644
--- a/gdb/rdi-share/unixcomm.c
+++ b/gdb/rdi-share/unixcomm.c
@@ -8,8 +8,8 @@
/* -*-C-*-
*
- * $Revision: 1.8 $
- * $Date: 1999/11/01 15:33:00 $
+ * $Revision: 1.9 $
+ * $Date: 2000/01/06 13:12:33 $
*
*/
@@ -68,6 +68,7 @@
#define PP_TIMEOUT 1 /* seconds */
#ifdef sun
+#define SERIAL_PREFIX "/dev/tty"
#define SERPORT1 "/dev/ttya"
#define SERPORT2 "/dev/ttyb"
#define PARPORT1 "/dev/bpp0"
@@ -75,6 +76,7 @@
#endif
#ifdef __hpux
+#define SERIAL_PREFIX "/dev/tty"
#define SERPORT1 "/dev/tty00"
#define SERPORT2 "/dev/tty01"
#define PARPORT1 "/dev/ptr_parallel"
@@ -82,6 +84,7 @@
#endif
#ifdef __linux__
+#define SERIAL_PREFIX "/dev/ttyS"
#define SERPORT1 "/dev/ttyS0"
#define SERPORT2 "/dev/ttyS1"
#define PARPORT1 "/dev/par0"
@@ -89,6 +92,7 @@
#endif
#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi)
+#define SERIAL_PREFIX "/dev/cuaa"
#define SERPORT1 "/dev/cuaa0"
#define SERPORT2 "/dev/cuaa1"
#define PARPORT1 "/dev/lpt0"
@@ -96,14 +100,12 @@
#endif
-#define SERIAL_PREFIX "/dev/tty"
#if defined(_WIN32) || defined (__CYGWIN32__)
+#define SERIAL_PREFIX "com"
#define SERPORT1 "com1"
#define SERPORT2 "com2"
#define PARPORT1 "lpt1"
#define PARPORT2 "lpt2"
-#undef SERIAL_PREFIX
-#define SERIAL_PREFIX "com"
#endif