Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Metasyntactic formatting nits
@ 2026-01-26 15:32 Tom Tromey
  2026-01-26 15:32 ` [PATCH 1/2] Use upper case for "metasyntactic variables" Tom Tromey
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tom Tromey @ 2026-01-26 15:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This series regularizes some gdb output concerning the display of
"metasyntactic variables" and also key bindings.

Regression tested on x86-64 Fedora 41.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (2):
      Use upper case for "metasyntactic variables"
      Regularize spelling of names of keys

 gdb/cli/cli-cmds.c               |  8 ++++----
 gdb/cli/cli-decode.h             |  2 +-
 gdb/printcmd.c                   | 34 +++++++++++++++++-----------------
 gdb/testsuite/lib/mi-support.exp |  5 -----
 gdb/utils.c                      |  2 +-
 5 files changed, 23 insertions(+), 28 deletions(-)
---
base-commit: 6660ba84d5484a51e09985c741091152f9febe5c
change-id: 20260126-metasyntactic-da571e0548da

Best regards,
-- 
Tom Tromey <tromey@adacore.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] Use upper case for "metasyntactic variables"
  2026-01-26 15:32 [PATCH 0/2] Metasyntactic formatting nits Tom Tromey
@ 2026-01-26 15:32 ` Tom Tromey
  2026-01-26 15:32 ` [PATCH 2/2] Regularize spelling of names of keys Tom Tromey
  2026-02-02 17:16 ` [PATCH 0/2] Metasyntactic formatting nits Kevin Buettner
  2 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2026-01-26 15:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

GNU typically uses all upper-case to refer to user-supplied text, as
opposed to the other common convention of angle brackets.

This patch fixes the cases of the latter that I found in help and
error text.
---
 gdb/cli/cli-cmds.c |  4 ++--
 gdb/printcmd.c     | 34 +++++++++++++++++-----------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index a37e38e9709..6fa5a61ae02 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2667,8 +2667,8 @@ INIT_GDB_FILE (cli_cmds)
   add_cmd ("essential", class_essential, _("\
 GDB essential commands.\n\
 Welcome to GDB!  This help text aims to provide a quickstart explanation\n\
-that will allow you to start using GDB.  Feel free to use \"help <cmd>\"\n\
-to get further explanations for any command <cmd>, and check the online\n\
+that will allow you to start using GDB.  Feel free to use \"help CMD\"\n\
+to get further explanations for any command CMD, and check the online\n\
 documentation for in-depth explanations.\n\
 Here are some common GDB behaviors that you can expect, which are\n\
 not tied to any specific command but rather GDB functionality itself:\n\
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 7c97fc71992..666ed5a8a64 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -3036,7 +3036,7 @@ memory_tag_with_logical_tag_command (const char *args, int from_tty)
     show_memory_tagging_unsupported ();
 
   if (args == nullptr)
-    error_no_arg (_("<address> <tag>"));
+    error_no_arg (_("ADDRESS TAG"));
 
   gdb::byte_vector tags;
   struct value *val;
@@ -3116,7 +3116,7 @@ parse_set_allocation_tag_input (const char *args, struct value **val,
 }
 
 /* Implement the "memory-tag set-allocation-tag" command.
-   ARGS should be in the format <address> <length> <tags>.  */
+   ARGS should be in the format ADDRESS LENGTH TAGS.  */
 
 static void
 memory_tag_set_allocation_tag_command (const char *args, int from_tty)
@@ -3125,7 +3125,7 @@ memory_tag_set_allocation_tag_command (const char *args, int from_tty)
     show_memory_tagging_unsupported ();
 
   if (args == nullptr)
-    error_no_arg (_("<starting address> <length> <tag bytes>"));
+    error_no_arg (_("STARTING-ADDRESS LENGTH TAG-BYTES"));
 
   gdb::byte_vector tags;
   size_t length = 0;
@@ -3399,37 +3399,37 @@ Generic command for printing and manipulating memory tag properties."),
   add_cmd ("print-logical-tag", class_vars,
 	   memory_tag_print_logical_tag_command,
 	   ("Print the logical tag from POINTER.\n\
-Usage: memory-tag print-logical-tag <POINTER>.\n\
-<POINTER> is an expression that evaluates to a pointer.\n\
+Usage: memory-tag print-logical-tag POINTER.\n\
+POINTER is an expression that evaluates to a pointer.\n\
 Print the logical tag contained in POINTER.  The tag interpretation is\n\
 architecture-specific."),
 	   &memory_tag_list);
   add_cmd ("print-allocation-tag", class_vars,
 	   memory_tag_print_allocation_tag_command,
 	   _("Print the allocation tag for ADDRESS.\n\
-Usage: memory-tag print-allocation-tag <ADDRESS>.\n\
-<ADDRESS> is an expression that evaluates to a memory address.\n\
+Usage: memory-tag print-allocation-tag ADDRESS.\n\
+ADDRESS is an expression that evaluates to a memory address.\n\
 Print the allocation tag associated with the memory address ADDRESS.\n\
 The tag interpretation is architecture-specific."),
 	   &memory_tag_list);
   add_cmd ("with-logical-tag", class_vars, memory_tag_with_logical_tag_command,
 	   _("Print a POINTER with a specific logical TAG.\n\
-Usage: memory-tag with-logical-tag <POINTER> <TAG>\n\
-<POINTER> is an expression that evaluates to a pointer.\n\
-<TAG> is a sequence of hex bytes that is interpreted by the architecture\n\
+Usage: memory-tag with-logical-tag POINTER TAG\n\
+POINTER is an expression that evaluates to a pointer.\n\
+TAG is a sequence of hex bytes that is interpreted by the architecture\n\
 as a single memory tag."),
 	   &memory_tag_list);
   add_cmd ("set-allocation-tag", class_vars,
 	   memory_tag_set_allocation_tag_command,
 	   _("Set the allocation tag(s) for a memory range.\n\
-Usage: memory-tag set-allocation-tag <ADDRESS> <LENGTH> <TAG_BYTES>\n\
-<ADDRESS> is an expression that evaluates to a memory address\n\
-<LENGTH> is the number of bytes that is added to <ADDRESS> to calculate\n\
+Usage: memory-tag set-allocation-tag ADDRESS LENGTH TAG-BYTES\n\
+ADDRESS is an expression that evaluates to a memory address\n\
+LENGTH is the number of bytes that is added to ADDRESS to calculate\n\
 the memory range.\n\
-<TAG_BYTES> is a sequence of hex bytes that is interpreted by the\n\
+TAG-BYTES is a sequence of hex bytes that is interpreted by the\n\
 architecture as one or more memory tags.\n\
 Sets the tags of the memory range [ADDRESS, ADDRESS + LENGTH)\n\
-to TAG_BYTES.\n\
+to TAG-BYTES.\n\
 \n\
 If the number of tags is greater than or equal to the number of tag granules\n\
 in the [ADDRESS, ADDRESS + LENGTH) range, only the tags up to the\n\
@@ -3442,8 +3442,8 @@ that gets repeated until the number of tag granules in the memory range\n\
 	   &memory_tag_list);
   add_cmd ("check", class_vars, memory_tag_check_command,
 	   _("Validate a pointer's logical tag against the allocation tag.\n\
-Usage: memory-tag check <POINTER>\n\
-<POINTER> is an expression that evaluates to a pointer\n\
+Usage: memory-tag check POINTER\n\
+POINTER is an expression that evaluates to a pointer\n\
 Fetch the logical and allocation tags for POINTER and compare them\n\
 for equality.  If the tags do not match, print additional information about\n\
 the tag mismatch."),

-- 
2.52.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] Regularize spelling of names of keys
  2026-01-26 15:32 [PATCH 0/2] Metasyntactic formatting nits Tom Tromey
  2026-01-26 15:32 ` [PATCH 1/2] Use upper case for "metasyntactic variables" Tom Tromey
@ 2026-01-26 15:32 ` Tom Tromey
  2026-02-02 17:16 ` [PATCH 0/2] Metasyntactic formatting nits Kevin Buettner
  2 siblings, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2026-01-26 15:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes gdb to use <KEY> when referring to the name of a key that
the user should press -- basically for return and tab.

In one spot, an obsolete use of <return> is removed.
---
 gdb/cli/cli-cmds.c               | 4 ++--
 gdb/cli/cli-decode.h             | 2 +-
 gdb/testsuite/lib/mi-support.exp | 5 -----
 gdb/utils.c                      | 2 +-
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 6fa5a61ae02..5cf8f87cd75 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2674,8 +2674,8 @@ Here are some common GDB behaviors that you can expect, which are\n\
 not tied to any specific command but rather GDB functionality itself:\n\
 \n\
 EXPR is any arbitrary expression valid for the current programming language.\n\
-Pressing <return> with an empty prompt executes the last command again.\n\
-You can use <tab> to complete commands and symbols.  Pressing it twice lists\n\
+Pressing <RET> with an empty prompt executes the last command again.\n\
+You can use <TAB> to complete commands and symbols.  Pressing it twice lists\n\
 all possible completions if more than one is available."),
 	   &cmdlist);
   add_cmd ("internals", class_maintenance, _("\
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index fd9e2b7fcff..865f89ed9b5 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -171,7 +171,7 @@ struct cmd_list_element
 
   /* Nonzero says this is an abbreviation, and should not
      be mentioned in lists of commands.
-     This allows "br<tab>" to complete to "break", which it
+     This allows "br<TAB>" to complete to "break", which it
      otherwise wouldn't.  */
   unsigned int abbrev_flag : 1;
 
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 1dc389dea71..e21570c88b1 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -838,11 +838,6 @@ proc mi_gdb_test { args } {
 		fail "$message (unexpected output)"
 	    }
 	    set result 1
-	}
-	 "<return>" {
-	    send_gdb "\n"
-	    perror "Window too small."
-	     fail "$message"
 	}
 	 eof {
 	     perror "Process no longer exists"
diff --git a/gdb/utils.c b/gdb/utils.c
index ceea8317dc5..a121a6ea576 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1483,7 +1483,7 @@ pager_file::prompt_for_continue ()
     }
 
   /* Now we have to do this again, so that GDB will know that it doesn't
-     need to save the ---Type <return>--- line at the top of the screen.  */
+     need to save the ---Type <RET>--- line at the top of the screen.  */
   reinitialize_more_filter ();
   pagination_disabled_for_command = disable_pagination;
 

-- 
2.52.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Metasyntactic formatting nits
  2026-01-26 15:32 [PATCH 0/2] Metasyntactic formatting nits Tom Tromey
  2026-01-26 15:32 ` [PATCH 1/2] Use upper case for "metasyntactic variables" Tom Tromey
  2026-01-26 15:32 ` [PATCH 2/2] Regularize spelling of names of keys Tom Tromey
@ 2026-02-02 17:16 ` Kevin Buettner
  2026-02-02 19:28   ` Eli Zaretskii
  2 siblings, 1 reply; 5+ messages in thread
From: Kevin Buettner @ 2026-02-02 17:16 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey, Eli Zaretskii

On Mon, 26 Jan 2026 08:32:44 -0700
Tom Tromey <tromey@adacore.com> wrote:

> This series regularizes some gdb output concerning the display of
> "metasyntactic variables" and also key bindings.
> 
> Regression tested on x86-64 Fedora 41.

Both parts LGTM.

It occurs to me that this might need approval from Eli too?

Approved-by: Kevin Buettner <kevinb@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Metasyntactic formatting nits
  2026-02-02 17:16 ` [PATCH 0/2] Metasyntactic formatting nits Kevin Buettner
@ 2026-02-02 19:28   ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2026-02-02 19:28 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches, tromey

> Date: Mon, 2 Feb 2026 10:16:55 -0700
> From: Kevin Buettner <kevinb@redhat.com>
> Cc: Tom Tromey <tromey@adacore.com>, Eli Zaretskii <eliz@gnu.org>
> 
> On Mon, 26 Jan 2026 08:32:44 -0700
> Tom Tromey <tromey@adacore.com> wrote:
> 
> > This series regularizes some gdb output concerning the display of
> > "metasyntactic variables" and also key bindings.
> > 
> > Regression tested on x86-64 Fedora 41.
> 
> Both parts LGTM.
> 
> It occurs to me that this might need approval from Eli too?

I'm okay with those changes, thanks.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-02 19:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-26 15:32 [PATCH 0/2] Metasyntactic formatting nits Tom Tromey
2026-01-26 15:32 ` [PATCH 1/2] Use upper case for "metasyntactic variables" Tom Tromey
2026-01-26 15:32 ` [PATCH 2/2] Regularize spelling of names of keys Tom Tromey
2026-02-02 17:16 ` [PATCH 0/2] Metasyntactic formatting nits Kevin Buettner
2026-02-02 19:28   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox