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/v850/interp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sim/v850/interp.c') diff --git a/sim/v850/interp.c b/sim/v850/interp.c index 422d926..ef91d51 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, -- cgit v1.1