aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>1998-03-05 01:04:13 +0000
committerMartin Hunt <hunt@redhat.com>1998-03-05 01:04:13 +0000
commit1d7a3fd77597bae3c76039b603aef03471615020 (patch)
tree0e07e70f4effa17f4ecfb88d13cfb6eaeb952e3e
parent94ec3e76cb006c207486fcd5e6c8e93a5d92a0e3 (diff)
downloadgdb-1d7a3fd77597bae3c76039b603aef03471615020.zip
gdb-1d7a3fd77597bae3c76039b603aef03471615020.tar.gz
gdb-1d7a3fd77597bae3c76039b603aef03471615020.tar.bz2
Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>
* serial.c (_initialize_serial): Add a description of "set remotelogbase". * command.c (do_setshow_command): If no arguments are supplied, don't dump core, instead print out an error message.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/command.c18
-rw-r--r--gdb/serial.c2
3 files changed, 25 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3209545..6bb149d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>
+
+ * serial.c (_initialize_serial): Add a description of
+ "set remotelogbase".
+
+ * command.c (do_setshow_command): If no arguments are supplied,
+ don't dump core, instead print out an error message.
+
Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Fix thinko in last change.
diff --git a/gdb/command.c b/gdb/command.c
index bd5c123..8109b93 100644
--- a/gdb/command.c
+++ b/gdb/command.c
@@ -281,7 +281,6 @@ add_set_enum_cmd (name, class, enumlist, var, doc, list)
{
struct cmd_list_element *c
= add_set_cmd (name, class, var_enum, var, doc, list);
-
c->enums = enumlist;
return c;
@@ -1269,8 +1268,23 @@ do_setshow_command (arg, from_tty, c)
char *match = NULL;
char *p;
- p = strchr (arg, ' ');
+ /* if no argument was supplied, print an informative error message */
+ if (arg == NULL)
+ {
+ char msg[1024];
+ strcpy (msg, "Requires an argument. Valid arguments are ");
+ for (i = 0; c->enums[i]; i++)
+ {
+ if (i != 0)
+ strcat (msg, ", ");
+ strcat (msg, c->enums[i]);
+ }
+ strcat (msg, ".");
+ error (msg);
+ }
+ p = strchr (arg, ' ');
+
if (p)
len = p - arg;
else
diff --git a/gdb/serial.c b/gdb/serial.c
index 4bbc22d..89a116e 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -517,7 +517,7 @@ by gdbserver.", &setlist),
add_show_from_set (add_set_enum_cmd ("remotelogbase", no_class,
logbase_enums,
(char *)&serial_logbase,
- "Set ...",
+ "Set numerical base for remote session logging",
&setlist),
&showlist);
}