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 AE76D3854804 for ; Tue, 16 Mar 2021 17:00:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AE76D3854804 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 12GH0SXH004770 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Mar 2021 13:00:32 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 12GH0SXH004770 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 BC9331E793; Tue, 16 Mar 2021 13:00:27 -0400 (EDT) Subject: Re: [PATCH v2 4/5] gdb: generate the prefix name for prefix commands on demand To: Marco Barisione , gdb-patches@sourceware.org References: <20210108100706.96190-1-mbarisione@undo.io> <20210125112649.56362-1-mbarisione@undo.io> <20210125112649.56362-5-mbarisione@undo.io> <1b0b042b-f8f4-c350-dcbf-1f617670f24f@polymtl.ca> From: Simon Marchi Message-ID: Date: Tue, 16 Mar 2021 13:00:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <1b0b042b-f8f4-c350-dcbf-1f617670f24f@polymtl.ca> 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 Tue, 16 Mar 2021 17:00:28 +0000 X-Spam-Status: No, score=-4.3 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: Tue, 16 Mar 2021 17:00:35 -0000 On 2021-03-08 6:25 p.m., Simon Marchi via Gdb-patches wrote: > On 2021-01-25 6:26 a.m., Marco Barisione via Gdb-patches wrote: >> Previously, the prefixname field of struct cmd_list_element was manually >> set for prefix commands. This seems verbose and error prone as it >> required every single call to functions adding prefix commands to >> specify the prefix name while the same information can be easily >> generated. >> >> Historically, this was not possible as the prefix field was null for >> many commands, but this was fixed in commit >> 3f4d92ebdf7f848b5ccc9e8d8e8514c64fde1183 by Philippe Waroquiers, so >> we can rely on the prefix field being set when generating the prefix >> name. > > Sounds like a good idea to me. The patch is ok to push with these nits > fixed. Oh, one more thing, the patch doesn't build with --enable-targets=all. Please configure your GDB build with --enable-targets=all and make sure it builds. There may also be some places that need to be updated in files that are specific to some platforms. That would be all the files that are mentioned in gdb/configure.nat. Please make a best effort to update the calls in these files, even if you can't build them. Simon