From patchwork Mon Jan 4 10:09:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10209 Received: (qmail 130759 invoked by alias); 4 Jan 2016 10:09:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 130732 invoked by uid 89); 4 Jan 2016 10:09:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2670, mach X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 04 Jan 2016 10:09:31 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D84E53405C3 for ; Mon, 4 Jan 2016 10:09:28 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: parse_args: polish getopt error message [committed] Date: Mon, 4 Jan 2016 05:09:27 -0500 Message-Id: <1451902167-3143-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes The cris sim hit a few failures after the recent getopt logic, and the expected output showed a few ways we can improve things to better match other utils. --- sim/common/ChangeLog | 4 ++++ sim/common/sim-options.c | 2 +- sim/testsuite/sim/cris/ChangeLog | 5 +++++ sim/testsuite/sim/cris/asm/opterr1.ms | 2 +- sim/testsuite/sim/cris/asm/opterr2.ms | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 97a170a..e0eebb2 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,9 @@ 2016-01-04 Mike Frysinger + * sim-options.c (sim_parse_args): Tweak getopt error message. + +2016-01-04 Mike Frysinger + * acinclude.m4 (sim-bswap): Delete. * configure: Regenerate. * Make-common.in (SIM_BSWAP): Delete. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index f662b73..ad8b1eb 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -616,7 +616,7 @@ sim_parse_args (SIM_DESC sd, char **argv) badopt = argv[optind - 1]; sim_io_eprintf (sd, - "%s: unrecognized option: %s\n" + "%s: unrecognized option '%s'\n" "Use --help for a complete list of options.\n", STATE_MY_NAME (sd), badopt); diff --git a/sim/testsuite/sim/cris/ChangeLog b/sim/testsuite/sim/cris/ChangeLog index fa34863..76dcec5 100644 --- a/sim/testsuite/sim/cris/ChangeLog +++ b/sim/testsuite/sim/cris/ChangeLog @@ -1,3 +1,8 @@ +2016-01-04 Mike Frysinger + + * asm/opterr1.ms: Update expected output. + * asm/opterr2.ms: Likewise. + 2015-12-25 Mike Frysinger * asm/io1.ms: Update expected output. diff --git a/sim/testsuite/sim/cris/asm/opterr1.ms b/sim/testsuite/sim/cris/asm/opterr1.ms index 94118db..409f58b 100644 --- a/sim/testsuite/sim/cris/asm/opterr1.ms +++ b/sim/testsuite/sim/cris/asm/opterr1.ms @@ -1,5 +1,5 @@ # mach: crisv3 crisv8 crisv10 crisv32 # xerror: -# output: *: unrecognized option [`']--cris-stats=xyz'\n +# output: *: unrecognized option [`']--cris-stats=xyz'\nUse --help for a complete list of options.\n # sim: --cris-stats=xyz .include "nopv32t.ms" diff --git a/sim/testsuite/sim/cris/asm/opterr2.ms b/sim/testsuite/sim/cris/asm/opterr2.ms index 129ad1d..084d61e 100644 --- a/sim/testsuite/sim/cris/asm/opterr2.ms +++ b/sim/testsuite/sim/cris/asm/opterr2.ms @@ -1,5 +1,5 @@ # mach: crisv3 crisv8 crisv10 crisv32 # xerror: -# output: *: unrecognized option [`']--cris-xyz'\n +# output: *: unrecognized option [`']--cris-xyz'\nUse --help for a complete list of options.\n # sim: --cris-xyz .include "nopv32t.ms"