aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-decode.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-02-23 20:12:13 +0000
committerAndrew Cagney <cagney@redhat.com>2002-02-23 20:12:13 +0000
commitbbaca940ebb8624260af6a0569b57cf4d32cf8c9 (patch)
treec8b3b3f60920b696964de3dcb1aa240dfd16f06a /gdb/cli/cli-decode.c
parentb8b8b04721a9b0a677ecd66aa03e3e322d988385 (diff)
downloadbinutils-bbaca940ebb8624260af6a0569b57cf4d32cf8c9.zip
binutils-bbaca940ebb8624260af6a0569b57cf4d32cf8c9.tar.gz
binutils-bbaca940ebb8624260af6a0569b57cf4d32cf8c9.tar.bz2
* cli/cli-decode.c (cmd_cfunc_eq): New function.
* command.h (cmd_cfunc_eq): Declare. * cli/cli-decode.h (cmd_cfunc_eq): Ditto. * cli/cli-cmds.h (is_complete_command): Change parameter to a ``struct cmd_list_element *''. * cli/cli-cmds.c (is_complete_command): Update. Use cmd_cfunc_eq. * top.c (execute_command): Pass the command to is_complete_command. * tracepoint.c: Replace function.cfunc with cmd_cfunc_eq.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r--gdb/cli/cli-decode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index d64b2f6..a13b7b8 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -79,6 +79,13 @@ set_cmd_sfunc (struct cmd_list_element *cmd,
cmd->function.sfunc = sfunc; /* Ok. */
}
+int
+cmd_cfunc_eq (struct cmd_list_element *cmd,
+ void (*cfunc) (char *args, int from_tty))
+{
+ return cmd->func == do_cfunc && cmd->function.cfunc == cfunc;
+}
+
/* Add element named NAME.
CLASS is the top level category into which commands are broken down