From 77cf2ef5dc9099501529151921a73be904757466 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 3 Jan 2016 21:40:34 -0500 Subject: sim: parse_args: display getopt error ourselves Fix a long standing todo where we let getopt write directly to stderr when an invalid option is passed. Use the sim io funcs instead as they go through the filtered callbacks that gdb wants. --- sim/bfin/ChangeLog | 4 ++++ sim/bfin/interp.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sim/bfin') diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1bbef04..67612b2 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,5 +1,9 @@ 2016-01-03 Mike Frysinger + * interp.c (sim_open): Update sim_parse_args comment. + +2016-01-03 Mike Frysinger + * TODO: Delete file. 2016-01-03 Mike Frysinger diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 84fb085..ad86500 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); -- cgit v1.1