From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 1C29839D7421 for ; Fri, 5 Feb 2021 04:52:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1C29839D7421 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1154qfB7014910 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Feb 2021 23:52:45 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1154qfB7014910 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0C0A31E945; Thu, 4 Feb 2021 23:52:41 -0500 (EST) Subject: Re: [PATCH v5 20/25] New memory-tag commands To: Luis Machado , gdb-patches@sourceware.org References: <20210127202112.2485702-1-luis.machado@linaro.org> <20210127202112.2485702-21-luis.machado@linaro.org> From: Simon Marchi Message-ID: <295ad93d-a12d-da03-fcd5-20f93f3cff80@polymtl.ca> Date: Thu, 4 Feb 2021 23:52:40 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 5 Feb 2021 04:52:41 +0000 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 04:52:48 -0000 >> 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