From patchwork Sat Sep 15 02:55:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 29382 Received: (qmail 30796 invoked by alias); 15 Sep 2018 02:55:29 -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 30579 invoked by uid 89); 15 Sep 2018 02:55:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:startup, touched, create_inferior, sk:mainten X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.47.168) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Sep 2018 02:55:26 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway22.websitewelcome.com (Postfix) with ESMTP id DA3AB743E for ; Fri, 14 Sep 2018 21:55:24 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 10k0gfRvKPvAd10k0gZhR7; Fri, 14 Sep 2018 21:55:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wG+jEWaN1FTRtWECmz13blvu2dwhcB+bGUpDQxGPG1M=; b=VkdA/Y4wTA5qwBvQQTMj2n7Ulx Q7fZAs0FhneGkjFi+y4lQE3uyY9dt2oYseIF9j++6G4Fd3eOJ3nw+dzyb3mgsY9XRHsNFH6cx8gDe D36r0Lshm2h4NxuDONQQC3ZJ0; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:40784 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g10k0-000tP4-Ic; Fri, 14 Sep 2018 21:55:24 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 2/3] Use GNU style for metasyntactic variables in gdb Date: Fri, 14 Sep 2018 20:55:21 -0600 Message-Id: <20180915025522.18723-3-tom@tromey.com> In-Reply-To: <20180915025522.18723-1-tom@tromey.com> References: <20180915025522.18723-1-tom@tromey.com> I searched for other spots that did not use the GNU style for metasyntactic syntactic variables. This patch fixes most of the ones I found in gdb proper. There are a few remaining in MI, but I was unsure whether those should be touched. gdb/ChangeLog 2018-09-14 Tom Tromey * top.c (new_ui_command): Use GNU style for metasyntactic variables. * breakpoint.c (stopat_command): Use GNU style for metasyntactic variables. * maint.c (maintenance_translate_address): Remove "<>" around text. * interps.c (interpreter_exec_cmd): Use GNU style for metasyntactic variables. * nto-procfs.c (nto_procfs_target_info): Use GNU style for metasyntactic variables. * tracepoint.c (tfind_range_command): Use GNU style for metasyntactic variables. (tfind_outside_command): Likewise. (_initialize_tracepoint): Likewise. * remote.c (extended_remote_target::create_inferior): Use GNU style for metasyntactic variables. * sparc64-tdep.c (adi_examine_command): Use GNU style for metasyntactic variables. (adi_assign_command): Likewise. gdb/testsuite/ChangeLog 2018-09-14 Tom Tromey * gdb.base/new-ui.exp (do_execution_tests): Update. * gdb.base/dbx.exp (test_breakpoints): Update. --- gdb/ChangeLog | 22 ++++++++++++++++++++++ gdb/breakpoint.c | 2 +- gdb/interps.c | 2 +- gdb/maint.c | 2 +- gdb/nto-procfs.c | 2 +- gdb/remote.c | 2 +- gdb/sparc64-tdep.c | 15 +++++++++------ gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/dbx.exp | 2 +- gdb/testsuite/gdb.base/new-ui.exp | 2 +- gdb/top.c | 2 +- gdb/tracepoint.c | 8 ++++---- 12 files changed, 48 insertions(+), 18 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 4e7dac51574..85cb7d7afcd 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9591,7 +9591,7 @@ stopat_command (const char *arg, int from_tty) } if (badInput) - printf_filtered (_("Usage: stop at \n")); + printf_filtered (_("Usage: stop at LINE\n")); else break_command_1 (arg, 0, from_tty); } diff --git a/gdb/interps.c b/gdb/interps.c index 789ae869469..6fe4c74e938 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -375,7 +375,7 @@ interpreter_exec_cmd (const char *args, int from_tty) nrules = prules.count (); if (nrules < 2) - error (_("usage: interpreter-exec [ ... ]")); + error (_("Usage: interpreter-exec INTERPRETER [ COMMAND... ]")); old_interp = ui_interp->current_interpreter; diff --git a/gdb/maint.c b/gdb/maint.c index 5d4701cfacc..19db8a850b3 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -444,7 +444,7 @@ maintenance_translate_address (const char *arg, int from_tty) while (*p && !isspace (*p)) /* Find end of section name. */ p++; if (*p == '\000') /* End of command? */ - error (_("Need to specify and
")); + error (_("Need to specify section name and address")); int arg_len = p - arg; p = skip_spaces (p + 1); diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c index 54357af85b2..ed2ef37471d 100644 --- a/gdb/nto-procfs.c +++ b/gdb/nto-procfs.c @@ -143,7 +143,7 @@ class nto_procfs_target_native final : public nto_procfs_target static const target_info nto_procfs_target_info = { "procfs", N_("QNX Neutrino local or remote process"), - N_("QNX Neutrino process. target procfs ") + N_("QNX Neutrino process. target procfs NODE") }; struct nto_procfs_target_procfs final : public nto_procfs_target diff --git a/gdb/remote.c b/gdb/remote.c index 3b19da75eaf..39b3823ffc4 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -10158,7 +10158,7 @@ Remote replied unexpectedly while setting startup-with-shell: %s"), if (remote_exec_file[0]) error (_("Remote target does not support \"set remote exec-file\"")); if (!args.empty ()) - error (_("Remote target does not support \"set args\" or run ")); + error (_("Remote target does not support \"set args\" or run ARGS")); /* Fall back to "R". */ extended_remote_restart (); diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index f25f554f753..b1ee6c1b57d 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -449,7 +449,7 @@ do_assign (CORE_ADDR start, size_t bcnt, int version) Command syntax: - adi (examine|x)/count */ + adi (examine|x)[/COUNT] [ADDR] */ static void adi_examine_command (const char *args, int from_tty) @@ -473,7 +473,7 @@ adi_examine_command (const char *args, int from_tty) if (p != 0 && *p != 0) next_address = parse_and_eval_address (p); if (!cnt || !next_address) - error (_("Usage: adi examine|x[/count] ")); + error (_("Usage: adi examine|x[/COUNT] [ADDR]")); do_examine (next_address, cnt); } @@ -482,11 +482,14 @@ adi_examine_command (const char *args, int from_tty) Command syntax: - adi (assign|a)/count = */ + adi (assign|a)[/COUNT] ADDR = VERSION */ static void adi_assign_command (const char *args, int from_tty) { + static const char *adi_usage + = N_("Usage: adi assign|a[/COUNT] ADDR = VERSION"); + /* make sure program is active and adi is available */ if (!target_has_execution) error (_("ADI command requires a live process/thread")); @@ -496,13 +499,13 @@ adi_assign_command (const char *args, int from_tty) const char *exp = args; if (exp == 0) - error_no_arg (_("Usage: adi assign|a[/count] = ")); + error_no_arg (_(adi_usage)); char *q = (char *) strchr (exp, '='); if (q) *q++ = 0; else - error (_("Usage: adi assign|a[/count] = ")); + error ("%s", _(adi_usage)); size_t cnt = 1; const char *p = args; @@ -516,7 +519,7 @@ adi_assign_command (const char *args, int from_tty) if (p != 0 && *p != 0) next_address = parse_and_eval_address (p); else - error (_("Usage: adi assign|a[/count] = ")); + error ("%s", _(adi_usage)); int version = 0; if (q != NULL) /* parse version tag */ diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp index 40e02380cb9..688fcbed133 100644 --- a/gdb/testsuite/gdb.base/dbx.exp +++ b/gdb/testsuite/gdb.base/dbx.exp @@ -234,7 +234,7 @@ proc test_breakpoints { } { set stop_line [gdb_get_line_number "stop-at-call"] gdb_test "stop at average.c:$stop_line" "Breakpoint.*at.*: file.*average\.c, line $stop_line.*" gdb_test "stop in average.c:$stop_line" "Usage: stop in " - gdb_test "stop at main" "Usage: stop at " + gdb_test "stop at main" "Usage: stop at LINE" } # diff --git a/gdb/testsuite/gdb.base/new-ui.exp b/gdb/testsuite/gdb.base/new-ui.exp index ec15e221a17..36b7ff25df9 100644 --- a/gdb/testsuite/gdb.base/new-ui.exp +++ b/gdb/testsuite/gdb.base/new-ui.exp @@ -87,7 +87,7 @@ proc_with_prefix do_test {} { } gdb_test "new-ui" \ - "usage: new-ui " \ + "Usage: new-ui INTERPRETER TTY" \ "new-ui without arguments" set test "new-ui does not repeat" diff --git a/gdb/top.c b/gdb/top.c index 470276e3106..0a4d36cbea4 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -338,7 +338,7 @@ new_ui_command (const char *args, int from_tty) argc = argv.count (); if (argc < 2) - error (_("usage: new-ui ")); + error (_("Usage: new-ui INTERPRETER TTY")); interpreter_name = argv[0]; tty_name = argv[1]; diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index a96f56a06b5..bb5a8507739 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -2427,7 +2427,7 @@ tfind_range_command (const char *args, int from_tty) if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ - printf_filtered ("Usage: tfind range ,\n"); + printf_filtered ("Usage: tfind range STARTADDR, ENDADDR\n"); return; } @@ -2461,7 +2461,7 @@ tfind_outside_command (const char *args, int from_tty) if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ - printf_filtered ("Usage: tfind outside ,\n"); + printf_filtered ("Usage: tfind outside STARTADDR, ENDADDR\n"); return; } @@ -4031,12 +4031,12 @@ No argument means forward by one frame; '-' means backward by one frame."), add_cmd ("outside", class_trace, tfind_outside_command, _("\ Select a trace frame whose PC is outside the given range (exclusive).\n\ -Usage: tfind outside addr1, addr2"), +Usage: tfind outside ADDR1, ADDR2"), &tfindlist); add_cmd ("range", class_trace, tfind_range_command, _("\ Select a trace frame whose PC is in the given range (inclusive).\n\ -Usage: tfind range addr1,addr2"), +Usage: tfind range ADDR1, ADDR2"), &tfindlist); add_cmd ("line", class_trace, tfind_line_command, _("\