From 1ee870c5249864d36717a08864c60d7166b6b292 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 10 Oct 2017 18:12:06 -0600 Subject: [PATCH] Constify add_com_suppress_notification This constifies add_com_suppress_notification and fixes the one caller. gdb/ChangeLog 2017-11-07 Tom Tromey * stack.c (select_frame_command): Constify. * cli/cli-decode.c (add_com_suppress_notification): Constify. * command.h (add_com_suppress_notification): Constify. --- gdb/ChangeLog | 6 ++++++ gdb/cli/cli-decode.c | 2 +- gdb/command.h | 2 +- gdb/stack.c | 2 +- gdb/stack.h | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6f103aea30d..96c79651778 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2017-11-07 Tom Tromey + + * stack.c (select_frame_command): Constify. + * cli/cli-decode.c (add_com_suppress_notification): Constify. + * command.h (add_com_suppress_notification): Constify. + 2017-11-07 Tom Tromey * breakpoint.c (stop_command): Constify. diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 5fc3187001e..f66bb2a3d8e 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -950,7 +950,7 @@ add_com_alias (const char *name, const char *oldname, enum command_class theclas struct cmd_list_element * add_com_suppress_notification (const char *name, enum command_class theclass, - cmd_cfunc_ftype *fun, const char *doc, + cmd_const_cfunc_ftype *fun, const char *doc, int *suppress_notification) { struct cmd_list_element *element; diff --git a/gdb/command.h b/gdb/command.h index 71ad71d9538..c7922a0c3aa 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -274,7 +274,7 @@ extern struct cmd_list_element *add_com_alias (const char *, const char *, extern struct cmd_list_element *add_com_suppress_notification (const char *name, enum command_class theclass, - cmd_cfunc_ftype *fun, const char *doc, + cmd_const_cfunc_ftype *fun, const char *doc, int *supress_notification); extern struct cmd_list_element *add_info (const char *, diff --git a/gdb/stack.c b/gdb/stack.c index 42cb7369d15..24fad3ceb27 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -2270,7 +2270,7 @@ find_relative_frame (struct frame_info *frame, int *level_offset_ptr) expressions. */ void -select_frame_command (char *level_exp, int from_tty) +select_frame_command (const char *level_exp, int from_tty) { struct frame_info *prev_frame = get_selected_frame_if_set (); diff --git a/gdb/stack.h b/gdb/stack.h index 3379318cca5..563229fea4a 100644 --- a/gdb/stack.h +++ b/gdb/stack.h @@ -20,7 +20,7 @@ #ifndef STACK_H #define STACK_H -void select_frame_command (char *level_exp, int from_tty); +void select_frame_command (const char *level_exp, int from_tty); gdb::unique_xmalloc_ptr find_frame_funname (struct frame_info *frame, enum language *funlang,