Constify add_abbrev_prefix_cmd
authorTom Tromey <tom@tromey.com>
Tue, 10 Oct 2017 23:51:52 +0000 (17:51 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 7 Nov 2017 20:59:08 +0000 (13:59 -0700)
This changes add_abbrev_prefix_cmd to take a const-taking callback
function and then fixes the one caller.

gdb/ChangeLog
2017-11-07  Tom Tromey  <tom@tromey.com>

* breakpoint.c (stop_command): Constify.
* cli/cli-decode.c (struct cmd_list_element): Constify.
* command.h (add_abbrev_prefix_cmd): Constify.

gdb/ChangeLog
gdb/breakpoint.c
gdb/cli/cli-decode.c
gdb/command.h

index e1842d694b222d55aa0f09e477a9cf88f634acb5..6f103aea30d7165d6aa6f586d22da25cb06dec58 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-07  Tom Tromey  <tom@tromey.com>
+
+       * breakpoint.c (stop_command): Constify.
+       * cli/cli-decode.c (struct cmd_list_element): Constify.
+       * command.h (add_abbrev_prefix_cmd): Constify.
+
 2017-11-07  Pedro Alves  <palves@redhat.com>
 
        * breakpoint.c (extract_bp_kind): New enum.
index 9106f09a74d6190596ada5138d12829f5ea23b6c..97f704a0ef1489c149f8e03b8266c5637cc58ff6 100644 (file)
@@ -193,8 +193,6 @@ static void thbreak_command (char *, int);
 static void enable_breakpoint_disp (struct breakpoint *, enum bpdisp,
                                    int count);
 
-static void stop_command (char *arg, int from_tty);
-
 static void free_bp_location (struct bp_location *loc);
 static void incref_bp_location (struct bp_location *loc);
 static void decref_bp_location (struct bp_location **loc);
@@ -9658,7 +9656,7 @@ thbreak_command (char *arg, int from_tty)
 }
 
 static void
-stop_command (char *arg, int from_tty)
+stop_command (const char *arg, int from_tty)
 {
   printf_filtered (_("Specify the type of breakpoint to set.\n\
 Usage: stop in <function | address>\n\
index 87ebed5f6e2769ee4fae3ffa1181bf60f6403534..5fc3187001e53a6e1809fe9df1c7d5f1ec0b388c 100644 (file)
@@ -424,7 +424,7 @@ add_prefix_cmd (const char *name, enum command_class theclass,
 
 struct cmd_list_element *
 add_abbrev_prefix_cmd (const char *name, enum command_class theclass,
-                      cmd_cfunc_ftype *fun, const char *doc,
+                      cmd_const_cfunc_ftype *fun, const char *doc,
                       struct cmd_list_element **prefixlist,
                       const char *prefixname,
                       int allow_unknown, struct cmd_list_element **list)
index 32ee73af62c88f97f3a012a9537581b733e61b7a..71ad71d953819a103362c5852316beb0445d9e01 100644 (file)
@@ -173,7 +173,7 @@ extern struct cmd_list_element *add_prefix_cmd (const char *, enum command_class
 
 extern struct cmd_list_element *add_abbrev_prefix_cmd (const char *,
                                                       enum command_class,
-                                                      cmd_cfunc_ftype *fun,
+                                                      cmd_const_cfunc_ftype *fun,
                                                       const char *,
                                                       struct cmd_list_element
                                                       **, const char *, int,