From: Tom Tromey Date: Fri, 9 Jan 2026 20:13:16 +0000 (-0700) Subject: Use upper case for "metasyntactic variables" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7be36dcc1467c3be836484221f85fda174ef2f0;p=thirdparty%2Fbinutils-gdb.git Use upper case for "metasyntactic variables" 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. Reviewed-By: Eli Zaretskii Approved-by: Kevin Buettner --- 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 \"\n\ -to get further explanations for any command , 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 (_("
")); + 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
. */ + 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 (_(" ")); + 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 .\n\ - 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
.\n\ -
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 \n\ - is an expression that evaluates to a pointer.\n\ - 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
\n\ -
is an expression that evaluates to a memory address\n\ - is the number of bytes that is added to
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\ - 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 \n\ - 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."),