public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Maciej W. Rozycki <macro@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] GDB: Remove extraneous full stops from `set' command error messages Date: Wed, 29 Jun 2022 14:28:57 +0000 (GMT) [thread overview] Message-ID: <20220629142857.483E43851C13@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=575fd4cffd05be7bd56112afa8688201d70d3043 commit 575fd4cffd05be7bd56112afa8688201d70d3043 Author: Maciej W. Rozycki <macro@embecosm.com> Date: Wed Jun 29 15:27:41 2022 +0100 GDB: Remove extraneous full stops from `set' command error messages With errors given for bad commands such as `set annotate' or `set width' we produce an extraneous full stop within parentheses: (gdb) set annotate Argument required (integer to set it to.). (gdb) set width Argument required (integer to set it to, or "unlimited".). (gdb) This is grammatically incorrect, so remove the full stop and adjust the testsuite accordingly. Diff: --- gdb/cli/cli-setshow.c | 10 +++++----- gdb/testsuite/gdb.base/with.exp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 213573e443e..139ebaf8323 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -195,9 +195,9 @@ parse_cli_var_uinteger (var_types var_type, const char **arg, if (*arg == nullptr || **arg == '\0') { if (var_type == var_uinteger) - error_no_arg (_("integer to set it to, or \"unlimited\".")); + error_no_arg (_("integer to set it to, or \"unlimited\"")); else - error_no_arg (_("integer to set it to.")); + error_no_arg (_("integer to set it to")); } if (var_type == var_uinteger && is_unlimited_literal (arg, expression)) @@ -228,7 +228,7 @@ parse_cli_var_zuinteger_unlimited (const char **arg, bool expression) LONGEST val; if (*arg == nullptr || **arg == '\0') - error_no_arg (_("integer to set it to, or \"unlimited\".")); + error_no_arg (_("integer to set it to, or \"unlimited\"")); if (is_unlimited_literal (arg, expression)) val = -1; @@ -418,9 +418,9 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) if (*arg == '\0') { if (c->var->type () == var_integer) - error_no_arg (_("integer to set it to, or \"unlimited\".")); + error_no_arg (_("integer to set it to, or \"unlimited\"")); else - error_no_arg (_("integer to set it to.")); + error_no_arg (_("integer to set it to")); } if (c->var->type () == var_integer && is_unlimited_literal (&arg, true)) diff --git a/gdb/testsuite/gdb.base/with.exp b/gdb/testsuite/gdb.base/with.exp index 6cde27dc29b..ca19a18b03f 100644 --- a/gdb/testsuite/gdb.base/with.exp +++ b/gdb/testsuite/gdb.base/with.exp @@ -99,14 +99,14 @@ with_test_prefix "maint" { test_with_error "boolean" "2" "\"on\" or \"off\" expected\\." test_with_error "uinteger" "-1" "integer -1 out of range" test_with_error "uinteger" "" \ - "Argument required \\(integer to set it to, or \"unlimited\"\\.\\)\\." + "Argument required \\(integer to set it to, or \"unlimited\"\\)\\." test_with_error "zuinteger" "-1" "integer -1 out of range" test_with_error "zuinteger" "" \ - "Argument required \\(integer to set it to\\.\\)\\." + "Argument required \\(integer to set it to\\)\\." test_with_error "zuinteger-unlimited" "-2" \ "only -1 is allowed to set as unlimited" test_with_error "zuinteger-unlimited" "" \ - "Argument required \\(integer to set it to, or \"unlimited\"\\.\\)\\." + "Argument required \\(integer to set it to, or \"unlimited\"\\)\\." test_with_error "filename" "" \ "Argument required \\(filename to set it to\\.\\)\\." test_with_error "enum" "" \ @@ -243,7 +243,7 @@ with_test_prefix "errors" { "Cannot use this setting with the \"with\" command" gdb_test "with print elements -- p 1" \ - "Argument required \\(integer to set it to, or \"unlimited\"\\.\\)\\." + "Argument required \\(integer to set it to, or \"unlimited\"\\)\\." gdb_test "with -- p 1" \ "Missing setting before '--' delimiter"
reply other threads:[~2022-06-29 14:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220629142857.483E43851C13@sourceware.org \ --to=macro@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).