diff options
44 files changed, 138 insertions, 64 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index e9346c17321..2e846efb64d 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * wrapper.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * wrapper.c (sim_target_parse_arg_array): Replace for loop with a call to countargv. diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 274b294ecf7..9e61ed6cfc6 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -819,9 +819,7 @@ sim_open (SIM_OPEN_KIND kind, return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 71075540e2f..27d1e271608 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/avr/interp.c b/sim/avr/interp.c index 91b97928b83..f33de1cfa70 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -1704,9 +1704,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1bbef042863..67612b27885 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * TODO: Delete file. 2016-01-03 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 84fb0856c44..ad865005ea4 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -755,9 +755,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, e_sim_add_option_table (sd, bfin_mmu_options); e_sim_add_option_table (sd, bfin_mach_options); - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index d3584917617..9de52381b5a 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,11 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-options.c (sim_parse_args): Declare local save_opterr. Save + opterr state to it before calling getopt_long and restore afterwards. + Set opterr to 0. When optc is '?', call sim_io_eprintf. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * hw-device.h (device): Delete commented typedef. * sim-basics.h (device): Delete typedef. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 88663f7030e..f662b734cfb 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -460,7 +460,7 @@ dup_arg_p (const char *arg) SIM_RC sim_parse_args (SIM_DESC sd, char **argv) { - int c, i, argc, num_opts; + int c, i, argc, num_opts, save_opterr; char *p, *short_options; /* The `val' option struct entry is dynamically assigned for options that only come in the long form. ORIG_VAL is used to get the original value @@ -583,6 +583,11 @@ sim_parse_args (SIM_DESC sd, char **argv) /* Ensure getopt is initialized. */ optind = 0; + /* Do not lot getopt throw errors for us. But don't mess with the state for + any callers higher up by saving/restoring it. */ + save_opterr = opterr; + opterr = 0; + while (1) { int longind, optc; @@ -596,6 +601,25 @@ sim_parse_args (SIM_DESC sd, char **argv) } if (optc == '?') { + /* If getopt rejects a short option, optopt is set to the bad char. + If it rejects a long option, we have to look at optind. In the + short option case, argv could be multiple short options. */ + const char *badopt; + char optbuf[3]; + + if (optopt) + { + sprintf (optbuf, "-%c", optopt); + badopt = optbuf; + } + else + badopt = argv[optind - 1]; + + sim_io_eprintf (sd, + "%s: unrecognized option: %s\n" + "Use --help for a complete list of options.\n", + STATE_MY_NAME (sd), badopt); + result = SIM_RC_FAIL; break; } @@ -607,6 +631,8 @@ sim_parse_args (SIM_DESC sd, char **argv) } } + opterr = save_opterr; + free (long_options); free (short_options); free (handlers); diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 1e4e737ccea..dc56bb4569f 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index a0e30f5555f..9aa2062a99e 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -406,9 +406,7 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb, struct bfd *abfd, return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 6474681070e..7f8ea85cf8c 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-main.h (cris_devices): Delete. 2016-01-03 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index ac4ab458240..3b0b5466779 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -680,9 +680,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd, return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index e745678ff56..5c647bf08f4 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index 807c5c21a08..a49cd528be4 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -769,9 +769,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 7a6b86a2daa..0be8512084d 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * TODO: Delete file. 2016-01-03 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 6bf77fde0ae..d4a61b337a0 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -83,9 +83,7 @@ sim_open (kind, callback, abfd, argv) augment the meaning of an option. */ sim_add_option_table (sd, NULL, frv_options); - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 3a1acccf85f..03235f58131 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index ec019b30948..a2d59b0784b 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -807,9 +807,7 @@ sim_open (SIM_OPEN_KIND kind, return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 6291ce8eb24..1af2d8ab997 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * compile.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * config.in, configure: Regenerate. 2016-01-02 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index ef6a853a119..394167a601f 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -4859,9 +4859,7 @@ sim_open (SIM_OPEN_KIND kind, return 0; } - /* getopt will print the error message so we just have to exit if - this fails. FIXME: Hmmm... in the case of gdb we need getopt - to call print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 38d815a89e7..68bb2fd9dee 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * iq2000-sim.h: Delete file. * Makefile.in (SIM_EXTRA_DEPS): Delete iq2000-sim.h. * sim-main.h: Delete iq2000-sim.h include. diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index fefa764dde0..f9ccf1f2186 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -82,9 +82,7 @@ sim_open (kind, callback, abfd, argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 17297884282..a25d28be097 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c index 678602449a1..a135232f65f 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -121,9 +121,7 @@ sim_open (kind, callback, abfd, argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index c4c9759c601..7723cb91e3f 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * TODO: Delete file. 2016-01-03 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c index 2777f6192f7..435d8b6bda1 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -84,9 +84,7 @@ sim_open (kind, callback, abfd, argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 0ee8235ef92..fbf142b1a21 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-main.h (sim_state): Delete devices member. 2016-01-03 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c index a51266b91b1..25cea7c3d5f 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -445,9 +445,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 6b05983a8e4..05b9d459c9b 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index a591f616803..d50ca16a195 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1360,9 +1360,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 71cb6b287b5..783048da918 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index 2f85d378223..86ae78c5b1a 100644 --- a/sim/microblaze/interp.c +++ b/sim/microblaze/interp.c @@ -404,9 +404,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 47dd1b0f4bd..f8ec3e7a402 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 843ba94105e..0801ac17fd4 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -376,9 +376,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) sim_add_option_table (sd, NULL, mips_options); - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 8d230352e97..4311aa501e5 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c index 8550c4544d8..8959b40ff2c 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -125,9 +125,7 @@ sim_open (SIM_OPEN_KIND kind, sim_do_command (sd, "memory region 0,0x100000"); sim_do_command (sd, "memory region 0x40000000,0x200000"); - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 84b89e81244..18ad7b20a98 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c index 2807d19cd6a..bcc9ad5d9c4 100644 --- a/sim/moxie/interp.c +++ b/sim/moxie/interp.c @@ -1194,9 +1194,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index b3f885481ae..b9641d43125 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (count_argc): Delete. (trap): Change count_argc to countargv. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index f59ad00b5d5..2f59c5c92c9 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -2406,9 +2406,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index 8ccee765fe1..0ca9814a220 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-if.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sh64-sim.h (GETTWI, SETTWI): Delete unused defines. (sh5_devices): Delete. (struct _device): Delete. diff --git a/sim/sh64/sim-if.c b/sim/sh64/sim-if.c index ba8feb81237..907ee06a25c 100644 --- a/sim/sh64/sim-if.c +++ b/sim/sh64/sim-if.c @@ -79,9 +79,7 @@ sim_open (kind, callback, abfd, argv) return 0; } - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { free_state (sd); diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 49b97c14a98..96ae98a9222 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete. * configure: Regenerate. diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 422d926b2db..ef91d510e25 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -234,9 +234,7 @@ sim_open (SIM_OPEN_KIND kind, /* similarly if in the internal RAM region */ sim_do_command (sd, "memory region 0xffe000,0x1000,1024"); - /* getopt will print the error message so we just have to exit if this fails. - FIXME: Hmmm... in the case of gdb we need getopt to call - print_filtered. */ + /* The parser will print an error message for us, so we silently return. */ if (sim_parse_args (sd, argv) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, |