From 3cb2ab1a46e0764d4bf712f22c66c64c02dffb64 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Fri, 15 Mar 2013 17:53:44 +0000 Subject: [PATCH] gdb: 2013-03-15 Steve Ellcey * remote-sim.c (sim_command_completer): Make char arguments const. include: 2013-03-15 Steve Ellcey * gdb/remote-sim.h (sim_command_completer): Make char arguments const. sim: 2013-03-15 Steve Ellcey * arm/wrapper.c (sim_complete_command): Make char arguments const. * avr/interp.c (sim_complete_command): Ditto. * common/sim-options.c (sim_complete_command): Ditto. * cr16/interp.c (sim_complete_command): Ditto. * erc32/interf.c (sim_complete_command): Ditto. * m32c/gdb-if.c (sim_complete_command): Ditto. * microblaze/interp.c (sim_complete_command): Ditto. * ppc/sim_calls.c (sim_complete_command): Ditto. * rl78/gdb-if.c (sim_complete_command): Ditto. * rx/gdb-if.c (sim_complete_command): Ditto. * sh/interp.c (sim_complete_command): Ditto. --- gdb/ChangeLog | 4 ++++ gdb/remote-sim.c | 3 ++- include/gdb/ChangeLog | 4 ++++ include/gdb/remote-sim.h | 2 +- sim/ChangeLog | 14 ++++++++++++++ sim/arm/wrapper.c | 2 +- sim/avr/interp.c | 2 +- sim/common/sim-options.c | 2 +- sim/cr16/interp.c | 2 +- sim/erc32/interf.c | 2 +- sim/m32c/gdb-if.c | 2 +- sim/microblaze/interp.c | 2 +- sim/ppc/sim_calls.c | 2 +- sim/rl78/gdb-if.c | 2 +- sim/rx/gdb-if.c | 2 +- sim/sh/interp.c | 2 +- 16 files changed, 36 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 07cb80d4d3..da461ecb5d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-03-15 Steve Ellcey + + * remote-sim.c (sim_command_completer): Make char arguments const. + 2013-03-15 Tom Tromey PR c++/15116: diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 860eaf33ad..a578bbc074 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -1196,7 +1196,8 @@ simulator_command (char *args, int from_tty) } static VEC (char_ptr) * -sim_command_completer (struct cmd_list_element *ignore, char *text, char *word) +sim_command_completer (struct cmd_list_element *ignore, const char *text, + const char *word) { struct sim_inferior_data *sim_data; char **tmp; diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index d9618014a1..142f87ae30 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-03-15 Steve Ellcey + + * gdb/remote-sim.h (sim_command_completer): Make char arguments const. + 2013-01-01 Joel Brobecker Update year range in copyright notice of all files. diff --git a/include/gdb/remote-sim.h b/include/gdb/remote-sim.h index 43c22ebc3b..113030c821 100644 --- a/include/gdb/remote-sim.h +++ b/include/gdb/remote-sim.h @@ -278,7 +278,7 @@ void sim_do_command (SIM_DESC sd, char *cmd); /* Complete a command based on the available sim commands. Returns an array of possible matches. */ -char **sim_complete_command (SIM_DESC sd, char *text, char *word); +char **sim_complete_command (SIM_DESC sd, const char *text, const char *word); #ifdef __cplusplus } diff --git a/sim/ChangeLog b/sim/ChangeLog index 84d8d02b80..bc3c89412e 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,17 @@ +2013-03-15 Steve Ellcey + + * arm/wrapper.c (sim_complete_command): Make char arguments const. + * avr/interp.c (sim_complete_command): Ditto. + * common/sim-options.c (sim_complete_command): Ditto. + * cr16/interp.c (sim_complete_command): Ditto. + * erc32/interf.c (sim_complete_command): Ditto. + * m32c/gdb-if.c (sim_complete_command): Ditto. + * microblaze/interp.c (sim_complete_command): Ditto. + * ppc/sim_calls.c (sim_complete_command): Ditto. + * rl78/gdb-if.c (sim_complete_command): Ditto. + * rx/gdb-if.c (sim_complete_command): Ditto. + * sh/interp.c (sim_complete_command): Ditto. + 2013-01-01 Joel Brobecker Update year range in copyright notice of all files. diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 7f794a3440..a4b76835a5 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -945,7 +945,7 @@ sim_set_callbacks (ptr) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/avr/interp.c b/sim/avr/interp.c index a5212e79a7..23fc8dcbd5 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1855,7 +1855,7 @@ sim_set_callbacks (host_callback *ptr) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 73f84fb3de..fdc05a4a0e 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -950,7 +950,7 @@ complete_option_list (char **ret, size_t *cnt, const struct option_list *ol, completed is stored in @word. Trailing text of @word is not. */ char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { char **ret = NULL; size_t cnt = 1; diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index 2caffc24b2..3af58f6417 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -1553,7 +1553,7 @@ sim_store_register (sd, rn, memory, length) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c index 1ec02befdd..e2db44ea7f 100644 --- a/sim/erc32/interf.c +++ b/sim/erc32/interf.c @@ -485,7 +485,7 @@ sim_do_command(sd, cmd) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c index d02d24ec44..83e9f1e956 100644 --- a/sim/m32c/gdb-if.c +++ b/sim/m32c/gdb-if.c @@ -704,7 +704,7 @@ sim_do_command (SIM_DESC sd, char *cmd) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index d09327dbfe..72a4593612 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -1090,7 +1090,7 @@ sim_set_callbacks (host_callback *ptr) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index a4ceb3fbe1..a3ebba0f5b 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -259,7 +259,7 @@ sim_do_command (SIM_DESC sd, char *cmd) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c index 0c131a1997..04d4f0e110 100644 --- a/sim/rl78/gdb-if.c +++ b/sim/rl78/gdb-if.c @@ -567,7 +567,7 @@ sim_do_command (SIM_DESC sd, char *cmd) /* Stub for command completion. */ char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c index 248fdcacf8..2e41b0917a 100644 --- a/sim/rx/gdb-if.c +++ b/sim/rx/gdb-if.c @@ -864,7 +864,7 @@ sim_do_command (SIM_DESC sd, char *cmd) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } diff --git a/sim/sh/interp.c b/sim/sh/interp.c index e9313c76cb..4b2ca7e5a9 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2789,7 +2789,7 @@ sim_set_callbacks (p) } char ** -sim_complete_command (SIM_DESC sd, char *text, char *word) +sim_complete_command (SIM_DESC sd, const char *text, const char *word) { return NULL; } -- 2.34.1