aboutsummaryrefslogtreecommitdiff
path: root/gdb/rdi-share/serdrv.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-01-11 03:07:37 +0000
committerJason Molenda <jmolenda@apple.com>2000-01-11 03:07:37 +0000
commit0d06e24ba79bdc3617c5e56a2c32b3a7f28a4bd5 (patch)
tree9533ed688a9ea7eca9bcad984dfda07fecc420bb /gdb/rdi-share/serdrv.c
parent3b7c8b741463f04bc932f698f9a68c64ff797992 (diff)
downloadgdb-0d06e24ba79bdc3617c5e56a2c32b3a7f28a4bd5.zip
gdb-0d06e24ba79bdc3617c5e56a2c32b3a7f28a4bd5.tar.gz
gdb-0d06e24ba79bdc3617c5e56a2c32b3a7f28a4bd5.tar.bz2
import gdb-2000-01-10 snapshot
Diffstat (limited to 'gdb/rdi-share/serdrv.c')
-rw-r--r--gdb/rdi-share/serdrv.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gdb/rdi-share/serdrv.c b/gdb/rdi-share/serdrv.c
index 43fd5a0..9a2992e 100644
--- a/gdb/rdi-share/serdrv.c
+++ b/gdb/rdi-share/serdrv.c
@@ -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}