aboutsummaryrefslogtreecommitdiff
path: root/gdb/serial.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-09-26 23:27:39 +0000
committerAndrew Cagney <cagney@redhat.com>2001-09-26 23:27:39 +0000
commite3abfe1d65599bf85589f5456cee76ca4f6ff1e2 (patch)
tree9b581785761363ab3899757238d2d4e549530a68 /gdb/serial.c
parentff1da24e18b713483876bb2f5f31ddcc38a778c8 (diff)
downloadgdb-e3abfe1d65599bf85589f5456cee76ca4f6ff1e2.zip
gdb-e3abfe1d65599bf85589f5456cee76ca4f6ff1e2.tar.gz
gdb-e3abfe1d65599bf85589f5456cee76ca4f6ff1e2.tar.bz2
Add framework for ``set/show serial ...''.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r--gdb/serial.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/serial.c b/gdb/serial.c
index 3442a4b..0e349f7 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -651,6 +651,25 @@ connect_command (char *args, int fromtty)
}
#endif /* 0 */
+/* Serial set/show framework. */
+
+static struct cmd_list_element *serial_set_cmdlist;
+static struct cmd_list_element *serial_show_cmdlist;
+
+static void
+serial_set_cmd (char *args, int from_tty)
+{
+ printf_unfiltered ("\"set serial\" must be followed by the name of a command.\n");
+ help_list (serial_set_cmdlist, "set serial ", -1, gdb_stdout);
+}
+
+static void
+serial_show_cmd (char *args, int from_tty)
+{
+ cmd_show_list (serial_show_cmdlist, from_tty, "");
+}
+
+
void
_initialize_serial (void)
{
@@ -660,6 +679,18 @@ _initialize_serial (void)
Use <CR>~. or <CR>~^D to break out.");
#endif /* 0 */
+ add_prefix_cmd ("serial", class_maintenance, serial_set_cmd, "\
+Set default serial/parallel port configuration.",
+ &serial_set_cmdlist, "set serial ",
+ 0/*allow-unknown*/,
+ &setlist);
+
+ add_prefix_cmd ("serial", class_maintenance, serial_show_cmd, "\
+Show default serial/parallel port configuration.",
+ &serial_show_cmdlist, "show serial ",
+ 0/*allow-unknown*/,
+ &showlist);
+
add_show_from_set
(add_set_cmd ("remotelogfile", no_class,
var_filename, (char *) &serial_logfile,