Re: [PATCH v5 20/25] New memory-tag commands

Simon Marchi via Gdb-patches
2021-02-05T04:52:50Z

>> void _initialize_printcmd ();
>> void
>> _initialize_printcmd ()
>> @@ -2982,4 +3263,63 @@ Construct a GDB command and then evaluate it.\n\
>> Usage: eval \"format string\", ARG1, ARG2, ARG3, ..., ARGN\n\
>> Convert the arguments to a string as \"printf\" would, but then\n\
>> treat this string as a command line, and evaluate it."));
>> +
>> + /* Memory tagging commands. */
>> + add_prefix_cmd ("memory-tag", class_vars, memory_tag_command, _("\
>> +Generic command for printing and manipulating memory tag properties."),
>> + &memory_tag_list, "memory-tag ", 0, &cmdlist);
>> + add_cmd ("print-logical-tag", class_vars,
>> + memory_tag_print_logical_tag_command,
>> + ("Print the logical tag for an address.\n\
>> +Usage: memory-tag print-logical-tag .\n\
>> + is an expression that evaluates to a pointer or memory address.\n\
>> +GDB will print the logical tag associated with . The tag\n\
>
> Instead of saying "GDB will print the...", use the infinite "Print the
> ...". I would also swap the two sentences to say what the command says
> first, before describing the argument. Something like:
>
> Print the logical tag associated with a pointer. POINTER is an
> expression that evaluates to a pointer.

I just noticed that the very first sentence of the help is pretty much
the same thing as I wrote. In that case, I think the "GDB will print
the..." sentence is simply redundant, I'd just remove it.

Simon