From 60a6003252b5e323abc03c268c5b16ac18e530f9 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Thu, 29 Jul 1993 18:11:33 +0000 Subject: [PATCH] * remote-monitor.c (_initialize_monitor): Comment out use of connect_command, since connect_command itself is commented out. * remote-monitor.c (generic_open): Parse arguments the same way as remote.c. --- gdb/ChangeLog | 6 ++++++ gdb/remote-monitor.c | 41 +++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc0eeba1ac5..23bcf59c5ff 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ Thu Jul 29 12:09:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * remote-monitor.c (_initialize_monitor): Comment out use of + connect_command, since connect_command itself is commented out. + + * remote-monitor.c (generic_open): Parse arguments the same way + as remote.c. + * hppa-tdep.c (pc_in_linker_stub): Fix unclosed comments. Wed Jul 28 13:19:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com) diff --git a/gdb/remote-monitor.c b/gdb/remote-monitor.c index d45af5e611a..41f87c13582 100644 --- a/gdb/remote-monitor.c +++ b/gdb/remote-monitor.c @@ -323,16 +323,11 @@ general_open(args, name, from_tty) char *name; int from_tty; { - int n; - char junk[100]; + if (args == NULL) + error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\ +`target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name, name); target_preopen(from_tty); - - n = sscanf(args, " %s %d %s", dev_name, &baudrate, junk); - - if (n != 2) - error("Bad arguments. Usage: target %s \n\ -or target monitor \n", name); monitor_close(0); @@ -341,7 +336,18 @@ or target monitor \n", name); if (!monitor_desc) perror_with_name(dev_name); - SERIAL_SETBAUDRATE(monitor_desc, baudrate); + /* The baud rate was specified when GDB was started. */ + if (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_RAW(monitor_desc); @@ -1046,9 +1052,8 @@ struct monitor_ops mon68_cmds = { struct target_ops rom68k_ops = { "rom68k", "Integrated System's ROM68K remote debug monitor", - "Use a remote computer running the ROM68K debug monitor, connected by a\n\ -serial line. Arguments are the name of the device for the serial line,\n\ -the speed to connect at in bits per second.", + "Use a remote computer running the ROM68K debug monitor.\n\ +Specify the serial device it is connected to (e.g. /dev/ttya).", rom68k_open, monitor_close, 0, @@ -1089,9 +1094,8 @@ the speed to connect at in bits per second.", struct target_ops bug_ops = { "bug", "Motorola's BUG remote serial debug monitor", - "Use a remote computer running Motorola's BUG debug monitor, connected by a\n\ -serial line. Arguments are the name of the device for the serial line,\n\ -the speed to connect at in bits per second.", + "Use a remote computer running Motorola's BUG debug monitor.\n\ +Specify the serial device it is connected to (e.g. /dev/ttya).", bug_open, monitor_close, 0, @@ -1132,9 +1136,8 @@ the speed to connect at in bits per second.", struct target_ops mon68_ops = { "mon68", "Intermetric's MON68 remote serial debug monitor", - "Use a remote computer running the MON68 debug monitor, connected by a\n\ -serial line. Arguments are the name of the device for the serial line,\n\ -the speed to connect at in bits per second.", + "Use a remote computer running the MON68 debug monitor.\n\ +Specify the serial device it is connected to (e.g. /dev/ttya).", mon68_open, monitor_close, 0, @@ -1193,9 +1196,11 @@ When enabled, a period \'.\' is displayed.", /* generic monitor command */ add_com ("monitor ", class_obscure, monitor_command, "Send a command to the debug monitor."); +#if 0 add_com ("connect", class_obscure, connect_command, "Connect the terminal directly up to a serial based command monitor.\n\ Use ~. or ~^D to break out."); +#endif add_target (&rom68k_ops); /* add_target (&mon68_ops); */ -- 2.30.2