+Tue Sep 14 12:21:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * remote.c, remote-nindy.c, remote-mon.c, remote-es.c: include
+ remote-utils.h.
+
+ * remote.c (remote_open), remote-nindy.c (nindy_open,
+ nindy_files_info), remote-mon.c (general_open), remote-es.c
+ (es1800_open): use remote-utils facilities for baud rate.
+
Tue Sep 14 09:12:17 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
* paread.c, coffread.c, elfread.c: Include <time.h> before libbfd.h.
#include "wait.h"
#include "terminal.h"
#include "command.h"
+#include "remote-utils.h"
#ifdef USG
#include <sys/types.h>
char buf[PBUFSIZ];
char *p;
int i, fcflag;
- char *baudrate;
+ char baudrate[1024];
m68020 = 0;
{
error_no_arg ("serial port device name");
}
- baudrate = baud_rate ? baud_rate : "19200"; /* default baudrate = 19200 */
+ sprintf(baudrate, "%d", sr_get_baud_rate());
target_preopen (from_tty);
es1800_close (0);
#include "command.h"
#include "serial.h"
#include "monitor.h"
+#include "remote-utils.h"
#ifdef HAVE_TERMIO
# define TERMINAL struct termios
perror_with_name(dev_name);
/* The baud rate was specified when GDB was started. */
- if (baud_rate)
+ if (SERIAL_SETBAUDRATE (monitor_desc, sr_get_baud_rate()))
{
- int rate;
-
- if (sscanf (baud_rate, "%d", &rate) == 1)
- if (SERIAL_SETBAUDRATE (monitor_desc, rate))
- {
- SERIAL_CLOSE (monitor_desc);
- perror_with_name (name);
- }
+ SERIAL_CLOSE (monitor_desc);
+ perror_with_name (name);
}
SERIAL_RAW(monitor_desc);
#include "nindy-share/stop.h"
#include "dcache.h"
+#include "remote-utils.h"
static DCACHE *nindy_dcache;
char *name; /* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
int from_tty;
{
+ char baudrate[1024];
if (!name)
error_no_arg ("serial port device name");
/* Allow user to interrupt the following -- we could hang if there's
no NINDY at the other end of the remote tty. */
immediate_quit++;
- ninConnect(name, baud_rate ? baud_rate : "9600",
+ sprintf(baudrate, "%d", sr_get_baud_rate());
+ ninConnect(name, baudrate,
nindy_initial_brk, !from_tty, nindy_old_protocol);
immediate_quit--;
static void
nindy_files_info ()
{
- printf("\tAttached to %s at %s bps%s%s.\n", savename,
- baud_rate? baud_rate: "9600",
+ printf("\tAttached to %s at %d bps%s%s.\n", savename,
+ sr_get_baud_rate(),
nindy_old_protocol? " in old protocol": "",
nindy_initial_brk? " with initial break": "");
}
#include "gdb-stabs.h"
#include "dcache.h"
+#include "remote-utils.h"
#if !defined(DONT_USE_REMOTE)
#ifdef USG
if (!remote_desc)
perror_with_name (name);
-#if 0
- /* FIXME: This should be using remote-utils.c. */
- if (baud_rate)
+ if (SERIAL_SETBAUDRATE (remote_desc, sr_get_baud_rate()))
{
- int rate;
-
- if (sscanf (baud_rate, "%d", &rate) == 1)
- if (SERIAL_SETBAUDRATE (remote_desc, rate))
- {
- SERIAL_CLOSE (remote_desc);
- perror_with_name (name);
- }
+ SERIAL_CLOSE (remote_desc);
+ perror_with_name (name);
}
-#endif
SERIAL_RAW (remote_desc);