aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-decode.c36
-rw-r--r--gdb/cli/cli-decode.h2
2 files changed, 2 insertions, 36 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 0c55526..459438e 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -101,22 +101,6 @@ print_help_for_command (struct cmd_list_element *c, const char *prefix,
bounce function (unless cfunc / sfunc is NULL that is). */
static void
-do_cfunc (struct cmd_list_element *c, char *args, int from_tty)
-{
- c->function.cfunc (args, from_tty);
-}
-
-static void
-set_cmd_cfunc (struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
-{
- if (cfunc == NULL)
- cmd->func = NULL;
- else
- cmd->func = do_cfunc;
- cmd->function.cfunc = cfunc;
-}
-
-static void
do_const_cfunc (struct cmd_list_element *c, char *args, int from_tty)
{
c->function.const_cfunc (args, from_tty);
@@ -149,12 +133,6 @@ set_cmd_sfunc (struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
}
int
-cmd_cfunc_eq (struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
-{
- return cmd->func == do_cfunc && cmd->function.cfunc == cfunc;
-}
-
-int
cmd_cfunc_eq (struct cmd_list_element *cmd, cmd_const_cfunc_ftype *cfunc)
{
return cmd->func == do_const_cfunc && cmd->function.const_cfunc == cfunc;
@@ -281,21 +259,12 @@ do_add_cmd (const char *name, enum command_class theclass,
}
struct cmd_list_element *
-add_cmd (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
- const char *doc, struct cmd_list_element **list)
-{
- cmd_list_element *result = do_add_cmd (name, theclass, doc, list);
- set_cmd_cfunc (result, fun);
- return result;
-}
-
-struct cmd_list_element *
add_cmd (const char *name, enum command_class theclass,
const char *doc, struct cmd_list_element **list)
{
cmd_list_element *result = do_add_cmd (name, theclass, doc, list);
result->func = NULL;
- result->function.cfunc = NULL; /* Ok. */
+ result->function.const_cfunc = NULL;
return result;
}
@@ -1960,6 +1929,5 @@ int
cli_user_command_p (struct cmd_list_element *cmd)
{
return (cmd->theclass == class_user
- && (cmd->func == do_cfunc || cmd->func == do_sfunc
- || cmd->func == do_const_cfunc));
+ && (cmd->func == do_const_cfunc || cmd->func == do_sfunc));
}
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index 76f3ca9..e3ac69b 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -113,8 +113,6 @@ struct cmd_list_element
union
{
/* If type is not_set_cmd, call it like this: */
- cmd_cfunc_ftype *cfunc;
- /* ... or like this. */
cmd_const_cfunc_ftype *const_cfunc;
/* If type is set_cmd or show_cmd, first set the variables,
and then call this: */