aboutsummaryrefslogtreecommitdiff
path: root/gdb/command.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-02-02 20:20:59 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-02-02 20:20:59 +0000
commit719d9abbd2d41e1ed0b314af47ce907d457af67b (patch)
tree464935e0e50776048392d358e73422928c960f28 /gdb/command.c
parent5b3591ab5c099ca985e8aac0ff538dfe36141072 (diff)
downloadfsf-binutils-gdb-719d9abbd2d41e1ed0b314af47ce907d457af67b.zip
fsf-binutils-gdb-719d9abbd2d41e1ed0b314af47ce907d457af67b.tar.gz
fsf-binutils-gdb-719d9abbd2d41e1ed0b314af47ce907d457af67b.tar.bz2
* command.c (add_set_cmd, no_just_help_class_command): Change
to make this the sfunc, not cfunc, since that is how we call it. * command.h: Comment difference between sfunc and cfunc. * demangle.c (set_demangling_command): Add third arg since that is how it is called. (_initialize_demangler): Use sfunc, not cfunc, for set_demangling_command, since that is how it is called. Remove show_demangling_command; it has no effect.
Diffstat (limited to 'gdb/command.c')
-rw-r--r--gdb/command.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/command.c b/gdb/command.c
index c302cac..cb727aa 100644
--- a/gdb/command.c
+++ b/gdb/command.c
@@ -192,9 +192,10 @@ add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
/* ARGSUSED */
void
-not_just_help_class_command (args, from_tty)
+not_just_help_class_command (args, from_tty, c)
char *args;
int from_tty;
+ struct cmd_list_element *c;
{
}
@@ -214,17 +215,15 @@ add_set_cmd (name, class, var_type, var, doc, list)
char *doc;
struct cmd_list_element **list;
{
- /* For set/show, we have to call do_setshow_command
- differently than an ordinary function (take commandlist as
- well as arg), so the function field isn't helpful. However,
- function == NULL means that it's a help class, so set the function
- to not_just_help_class_command. */
struct cmd_list_element *c
- = add_cmd (name, class, not_just_help_class_command, doc, list);
+ = add_cmd (name, class, NO_FUNCTION, doc, list);
c->type = set_cmd;
c->var_type = var_type;
c->var = var;
+ /* This needs to be something besides NO_FUNCTION so that this isn't
+ treated as a help class. */
+ c->function.sfunc = not_just_help_class_command;
return c;
}