diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-03 01:51:44 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-06 21:48:59 -0500 |
commit | 2e3d4f4d5d386995e99d035354a9e411d1dc0331 (patch) | |
tree | 6d149d58208966cc50be708fccc5d5273a702de5 | |
parent | 23ad6f3ec4b1086a987ba05e6ea77c131d72875c (diff) | |
download | fsf-binutils-gdb-2e3d4f4d5d386995e99d035354a9e411d1dc0331.zip fsf-binutils-gdb-2e3d4f4d5d386995e99d035354a9e411d1dc0331.tar.gz fsf-binutils-gdb-2e3d4f4d5d386995e99d035354a9e411d1dc0331.tar.bz2 |
sim: sim_{create_inferior,open,parse_args}: constify argv/env slightly
2016-01-03 Mike Frysinger <vapier@gentoo.org>
* sim-options.c (sim_parse_args): Mark argv array const.
* sim-options.h (sim_parse_args): Likewise.
61 files changed, 257 insertions, 79 deletions
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index b73c8ea..f05ba4b 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * remote-sim.h (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2015-11-24 Nick Clifton <nickc@redhat.com> * sim-aarch64.h: New file. diff --git a/include/gdb/remote-sim.h b/include/gdb/remote-sim.h index 372e59b..fc12898 100644 --- a/include/gdb/remote-sim.h +++ b/include/gdb/remote-sim.h @@ -104,7 +104,8 @@ struct host_callback_struct; sim_create_inferior. FIXME: What should the state of the simulator be? */ -SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char **argv); +SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, + struct bfd *abfd, char * const *argv); /* Destory a simulator instance. @@ -161,7 +162,8 @@ SIM_RC sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty); address space (according to the applicable ABI) and the program counter and stack pointer set accordingly. */ -SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env); +SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env); /* Fetch LENGTH bytes of the simulated program's memory. Start fetch diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index 2097fdb..c2224b1 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_create_inferior): Mark argv and env const. + (sim_open): Mark argv const. + 2016-01-05 Mike Frysinger <vapier@gentoo.org> * interp.c: Delete dis-asm.h include. diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c index 7dc0a2b..8ae78c4 100644 --- a/sim/aarch64/interp.c +++ b/sim/aarch64/interp.c @@ -131,7 +131,8 @@ aarch64_get_sym_value (const char *name) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { sim_cpu *cpu = STATE_CPU (sd, 0); long storage; @@ -329,7 +330,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct * callback, struct bfd * abfd, - char ** argv) + char * const * argv) { int i; sim_cpu *cpu; diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 8b83ef3..e769f63 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * wrapper.c (sim_create_inferior): Mark argv and env const. + (sim_open): Mark argv const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 9e61ed6..941a8fd 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -229,8 +229,8 @@ sim_resume (SIM_DESC sd ATTRIBUTE_UNUSED, SIM_RC sim_create_inferior (SIM_DESC sd ATTRIBUTE_UNUSED, struct bfd * abfd, - char ** argv, - char ** env) + char * const *argv, + char * const *env) { int argvlen = 0; int mach; @@ -800,7 +800,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, - char **argv) + char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 3398eb1..3d5b723 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/avr/interp.c b/sim/avr/interp.c index f33de1c..31a9940 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1678,7 +1678,8 @@ free_state (SIM_DESC sd) } SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -1756,7 +1757,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { SIM_CPU *cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 4f1f93d..62f70e3 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,13 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (bfin_syscall): Remove first const from argv. + (sim_open): Mark argv const. + (simple_env): Remove first const. + (bfin_user_init): Remove first const from argv and and env + (bfin_os_init): Remove first const from argv. + (sim_create_inferior): Mark argv and env const. + Drop casts from bfin_user_init and bfin_os_init calls. + 2016-01-05 Mike Frysinger <vapier@gentoo.org> * interp.c (step_once): Call TRACE_DISASM. diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index ccd6a8a..0875b51 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -119,7 +119,7 @@ void bfin_syscall (SIM_CPU *cpu) { SIM_DESC sd = CPU_STATE (cpu); - const char * const *argv = (void *)STATE_PROG_ARGV (sd); + char * const *argv = (void *)STATE_PROG_ARGV (sd); host_callback *cb = STATE_CALLBACK (sd); bu32 args[6]; CB_SYSCALL sc; @@ -716,7 +716,7 @@ bfin_initialize_cpu (SIM_DESC sd, SIM_CPU *cpu) SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *callback, - struct bfd *abfd, char **argv) + struct bfd *abfd, char * const *argv) { char c; int i; @@ -807,7 +807,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, } /* Some utils don't like having a NULL environ. */ -static const char * const simple_env[] = { "HOME=/", "PATH=/bin", NULL }; +static char * const simple_env[] = { "HOME=/", "PATH=/bin", NULL }; static bu32 fdpic_load_offset; @@ -965,7 +965,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, static void bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, - const char * const *argv, const char * const *env) + char * const *argv, char * const *env) { /* XXX: Missing host -> target endian ... */ /* Linux starts the user app with the stack: @@ -1147,7 +1147,7 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, } static void -bfin_os_init (SIM_DESC sd, SIM_CPU *cpu, const char * const *argv) +bfin_os_init (SIM_DESC sd, SIM_CPU *cpu, char * const *argv) { /* Pass the command line via a string in R0 like Linux expects. */ int i; @@ -1184,7 +1184,7 @@ bfin_virtual_init (SIM_DESC sd, SIM_CPU *cpu) SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv, char **env) + char * const *argv, char * const *env) { SIM_CPU *cpu = STATE_CPU (sd, 0); SIM_ADDR addr; @@ -1209,10 +1209,10 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, switch (STATE_ENVIRONMENT (sd)) { case USER_ENVIRONMENT: - bfin_user_init (sd, cpu, abfd, (void *)argv, (void *)env); + bfin_user_init (sd, cpu, abfd, argv, env); break; case OPERATING_ENVIRONMENT: - bfin_os_init (sd, cpu, (void *)argv); + bfin_os_init (sd, cpu, argv); break; default: bfin_virtual_init (sd, cpu); diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 6dc76f5..f1b372b 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-options.c (sim_parse_args): Mark argv array const. + * sim-options.h (sim_parse_args): Likewise. + 2016-01-05 Mike Frysinger <vapier@gentoo.org> * sim-trace.c: Include dis-asm.h. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index ad8b1eb..7393554 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -458,7 +458,7 @@ dup_arg_p (const char *arg) /* Called by sim_open to parse the arguments. */ SIM_RC -sim_parse_args (SIM_DESC sd, char **argv) +sim_parse_args (SIM_DESC sd, char * const *argv) { int c, i, argc, num_opts, save_opterr; char *p, *short_options; diff --git a/sim/common/sim-options.h b/sim/common/sim-options.h index 7d20382..8086a37 100644 --- a/sim/common/sim-options.h +++ b/sim/common/sim-options.h @@ -135,7 +135,7 @@ SIM_RC sim_add_option_table (SIM_DESC sd, sim_cpu *cpu, const OPTION *table); MODULE_INSTALL_FN standard_install; /* Called by sim_open to parse the arguments. */ -SIM_RC sim_parse_args (SIM_DESC sd, char **argv); +SIM_RC sim_parse_args (SIM_DESC sd, char * const *argv); /* Print help messages for the options. IS_COMMAND is non-zero when this function is called from the command line interpreter. */ diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index dedaa6d..6540eed 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index 9aa2062..fd63708 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -383,7 +383,8 @@ static int cr16_reg_fetch (SIM_CPU *, int, unsigned char *, int); static int cr16_reg_store (SIM_CPU *, int, unsigned char *, int); SIM_DESC -sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb, + struct bfd *abfd, char * const *argv) { struct simops *s; struct hash_entry *h; @@ -645,7 +646,8 @@ sim_engine_run (SIM_DESC sd, } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { bfd_vma start_address; diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index e51ce98..66231ce 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 3b0b546..3bbc9fd 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -617,7 +617,7 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd) SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, - char **argv) + char * const *argv) { char c; int i; @@ -959,8 +959,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv ATTRIBUTE_UNUSED, - char **envp ATTRIBUTE_UNUSED) + char * const *argv ATTRIBUTE_UNUSED, + char * const *envp ATTRIBUTE_UNUSED) { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 7d639fd..0941a34 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * endian.c (get_word): Delete all arch/big endian logic. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index a49cd52..cb8c6cf 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -746,7 +746,8 @@ static int d10v_reg_fetch (SIM_CPU *, int, unsigned char *, int); static int d10v_reg_store (SIM_CPU *, int, unsigned char *, int); SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { struct simops *s; struct hash_entry *h; @@ -1141,7 +1142,8 @@ sim_info (SIM_DESC sd, int verbose) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { bfd_vma start_address; diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 37620f9..c9a3522 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interf.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c index 7f3b8df..826a85a 100644 --- a/sim/erc32/interf.c +++ b/sim/erc32/interf.c @@ -162,7 +162,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; struct host_callback_struct *callback; struct bfd *abfd; - char **argv; + char * const *argv; { int argc = 0; @@ -288,8 +288,8 @@ SIM_RC sim_create_inferior(sd, abfd, argv, env) SIM_DESC sd; struct bfd *abfd; - char **argv; - char **env; + char * const *argv; + char * const *env; { bfd_vma start_address = 0; if (abfd != NULL) diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index ac9b3fb..684bcd5 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index d4a61b3..910811f 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -49,7 +49,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; host_callback *callback; bfd *abfd; - char **argv; + char * const *argv; { char c; int i; @@ -191,8 +191,8 @@ SIM_RC sim_create_inferior (sd, abfd, argv, envp) SIM_DESC sd; bfd *abfd; - char **argv; - char **envp; + char * const *argv; + char * const *envp; { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index a08f804..7f98a34 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index a2d59b0..dcb5a7d 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -788,7 +788,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, - char **argv) + char * const *argv) { char c; size_t i; @@ -863,8 +863,8 @@ sim_open (SIM_OPEN_KIND kind, SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv, - char **env) + char * const *argv, + char * const *env) { uint32_t addr; sim_cpu *cpu = STATE_CPU (sd, 0); diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 727c514..544b745 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * compile.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 394167a..c1c61d8 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -4826,7 +4826,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, - char **argv) + char * const *argv) { int i; SIM_DESC sd; @@ -5000,7 +5000,8 @@ sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { int i = 0; int len_arg = 0; diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index bcbe6fc..3d0d7f6 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index f9ccf1f..b1646e1 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -54,7 +54,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; host_callback *callback; struct bfd *abfd; - char **argv; + char * const *argv; { char c; int i; @@ -142,8 +142,8 @@ SIM_RC sim_create_inferior (sd, abfd, argv, envp) SIM_DESC sd; struct bfd *abfd; - char **argv; - char **envp; + char * const *argv; + char * const *envp; { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 8333d45..9d3c215 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index a135232..860c1e6 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -101,7 +101,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; host_callback *callback; struct bfd *abfd; - char **argv; + char * const *argv; { SIM_DESC sd = sim_state_alloc (kind, callback); char c; @@ -210,8 +210,8 @@ SIM_RC sim_create_inferior (sd, abfd, argv, envp) SIM_DESC sd; struct bfd *abfd; - char **argv; - char **envp; + char * const *argv; + char * const *envp; { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 1d132dc..e3ea0c8 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c index 181e8ed..46e151b 100644 --- a/sim/m32c/gdb-if.c +++ b/sim/m32c/gdb-if.c @@ -60,7 +60,7 @@ static int open; SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, - struct bfd *abfd, char **argv) + struct bfd *abfd, char * const *argv) { setbuf (stdout, 0); if (open) @@ -144,7 +144,8 @@ sim_load (SIM_DESC sd, const char *prog, struct bfd * abfd, int from_tty) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd * abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd * abfd, + char * const *argv, char * const *env) { check_desc (sd); diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index f30b9e5..32cfa37 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index 435d8b6..107865a 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -56,7 +56,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; host_callback *callback; struct bfd *abfd; - char **argv; + char * const *argv; { SIM_DESC sd = sim_state_alloc (kind, callback); char c; @@ -162,8 +162,8 @@ SIM_RC sim_create_inferior (sd, abfd, argv, envp) SIM_DESC sd; struct bfd *abfd; - char **argv; - char **envp; + char * const *argv; + char * const *envp; { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index e7020d9..dcc363d 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c index 25cea7c..ab20571 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -418,7 +418,7 @@ static int m68hc11_reg_store (SIM_CPU *, int, unsigned char *, int); SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *callback, - bfd *abfd, char **argv) + bfd *abfd, char * const *argv) { int i; SIM_DESC sd; @@ -547,7 +547,7 @@ sim_info (SIM_DESC sd, int verbose) SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv, char **env) + char * const *argv, char * const *env) { return sim_prepare_for_program (sd, abfd); } diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index bc2cb31..04e6aee 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index d50ca16..4509489 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1341,7 +1341,8 @@ free_state (SIM_DESC sd) } SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -1413,7 +1414,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, + char * const *argv, char * const *env) { SIM_CPU *cpu = STATE_CPU (sd, 0); char ** avp; diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index f8845b7..8b3f4b4 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index 86ae78c..142300e 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -385,7 +385,8 @@ free_state (SIM_DESC sd) } SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -457,7 +458,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, + char * const *argv, char * const *env) { SIM_CPU *cpu = STATE_CPU (sd, 0); diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index aee39b3..12c8b6c 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 0801ac1..61ff400 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -346,7 +346,8 @@ static int mips_reg_fetch (SIM_CPU *, int, unsigned char *, int); static int mips_reg_store (SIM_CPU *, int, unsigned char *, int); SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -999,7 +1000,8 @@ mips_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *memory, int length) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { #ifdef DEBUG diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 65ec3ae..fd5b235 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 8959b40..7f0655f 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -95,7 +95,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, - char **argv) + char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -321,8 +321,8 @@ sim_open (SIM_OPEN_KIND kind, SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, - char **argv, - char **env) + char * const *argv, + char * const *env) { memset (&State, 0, sizeof (State)); if (prog_bfd != NULL) { diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index e556c90..8e17523 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index bcc9ad5..6de1aa0 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -1172,7 +1172,8 @@ free_state (SIM_DESC sd) } SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -1275,7 +1276,8 @@ load_dtb (SIM_DESC sd, const char *filename) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, + char * const *argv, char * const *env) { char ** avp; int l, argc, i, tp; diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 0289280..3ef9051 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * msp430-sim.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-05 Mike Frysinger <vapier@gentoo.org> * msp430-sim.c (loader_write_mem): Delete. diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index 74a600d..5a6b3ed 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -137,7 +137,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, - char **argv) + char * const *argv) { SIM_DESC sd = sim_state_alloc (kind, callback); char c; @@ -224,8 +224,8 @@ msp430_sim_close (SIM_DESC sd, int quitting) SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv, - char **env) + char * const *argv, + char * const *env) { unsigned char resetv[2]; int c; diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index b5d1dd8..ae770ac 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim_calls.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure.ac (sim-bswap): Delete. diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index d25b46c..470c958 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -63,7 +63,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, - char **argv) + char * const *argv) { callbacks = callback; @@ -165,8 +165,8 @@ sim_info (SIM_DESC sd, int verbose) SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, - char **argv, - char **envp) + char * const *argv, + char * const *envp) { unsigned_word entry_point; TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n", diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog index 3f9bf4e..a3f3106 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * gdb-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c index f9f9c1b..e21fc1d 100644 --- a/sim/rl78/gdb-if.c +++ b/sim/rl78/gdb-if.c @@ -64,7 +64,7 @@ static struct host_callback_struct *host_callbacks; SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, - struct bfd *abfd, char **argv) + struct bfd *abfd, char * const *argv) { if (open) fprintf (stderr, "rl78 minisim: re-opened sim\n"); @@ -188,7 +188,8 @@ sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty) /* Create inferior. */ SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { check_desc (sd); diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 5460ccb..dbe6634 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * gdb-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c index 008cc93..eec5325 100644 --- a/sim/rx/gdb-if.c +++ b/sim/rx/gdb-if.c @@ -59,7 +59,7 @@ static int rx_sim_is_open; SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback, - struct bfd *abfd, char **argv) + struct bfd *abfd, char * const *argv) { if (rx_sim_is_open) fprintf (stderr, "rx minisim: re-opened sim\n"); @@ -208,7 +208,8 @@ sim_load (SIM_DESC sd, const char *prog, struct bfd *abfd, int from_tty) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *abfd, + char * const *argv, char * const *env) { check_desc (sd); diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index b24b906..4d5ba4f 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 2f59c5c..df29f96 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2378,7 +2378,8 @@ free_state (SIM_DESC sd) } SIM_DESC -sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) +sim_open (SIM_OPEN_KIND kind, host_callback *cb, + struct bfd *abfd, char * const *argv) { char **p; int i; @@ -2483,7 +2484,8 @@ parse_and_set_memory_size (SIM_DESC sd, const char *str) } SIM_RC -sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char **argv, char **env) +sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, + char * const *argv, char * const *env) { /* Clear the registers. */ memset (&saved_state, 0, diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index 07c76f8..149d6e1 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * sim-if.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/sh64/sim-if.c b/sim/sh64/sim-if.c index 907ee06..5eb096f 100644 --- a/sim/sh64/sim-if.c +++ b/sim/sh64/sim-if.c @@ -51,7 +51,7 @@ sim_open (kind, callback, abfd, argv) SIM_OPEN_KIND kind; host_callback *callback; struct bfd *abfd; - char **argv; + char * const *argv; { char c; int i; @@ -148,8 +148,8 @@ SIM_RC sim_create_inferior (sd, abfd, argv, envp) SIM_DESC sd; struct bfd *abfd; - char **argv; - char **envp; + char * const *argv; + char * const *envp; { SIM_CPU *current_cpu = STATE_CPU (sd, 0); SIM_ADDR addr; diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 37b29e8..d839a9a 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,8 @@ +2016-01-06 Mike Frysinger <vapier@gentoo.org> + + * interp.c (sim_open): Mark argv const. + (sim_create_inferior): Mark argv and env const. + 2016-01-04 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/v850/interp.c b/sim/v850/interp.c index ef91d51..daf9618 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -195,7 +195,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback * cb, struct bfd * abfd, - char ** argv) + char * const * argv) { int i; SIM_DESC sd = sim_state_alloc (kind, cb); @@ -309,8 +309,8 @@ sim_open (SIM_OPEN_KIND kind, SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd * prog_bfd, - char ** argv, - char ** env) + char * const *argv, + char * const *env) { memset (&State, 0, sizeof (State)); if (prog_bfd != NULL) |