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 6BA063858C66 for ; Thu, 12 Jan 2023 18:41:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BA063858C66 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca 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 30CIerAI018963 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 13:40:57 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 30CIerAI018963 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1673548858; bh=EGfycDJYgiNmvFAASmIkRfkhgyY5jBIA0r9Beh9hT/k=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=TJ1/bbzZgAr8qj9XTRJPMfRwZlgXNFdW2aUQLL0GDzy9Yv0eDSAziqVnlOUcsIWU2 rBRipLO0+FGhi2ZsCRBUczLQwh5yd38ZKivRs6nXHQ1vVUal1JtnflpoTtre5Gso1N EcBN4ym2Fs/RjxuxE1Vzl4yh8bEqXeHl46EX4m7w= Received: from [10.0.0.11] (unknown [217.28.27.60]) (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 A65A31E110; Thu, 12 Jan 2023 13:40:52 -0500 (EST) Message-ID: Date: Thu, 12 Jan 2023 13:40:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v8 2/6] GDB: Add missing inline documentation for `add_setshow_cmd_full' Content-Language: en-US To: "Maciej W. Rozycki" , gdb-patches@sourceware.org Cc: Andrew Burgess , Tom Tromey , Simon Sobisch References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 12 Jan 2023 18:40:53 +0000 X-Spam-Status: No, score=-3032.0 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/24/22 06:22, Maciej W. Rozycki wrote: > Complement commit 1d7fe7f01b93 ("gdb: Introduce setting construct > within cmd_list_element") and add missing description for > `add_setshow_cmd_full'. > --- > New change in v8, split off from 2/4 in v7. > --- > gdb/cli/cli-decode.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > gdb-setshow-cmd-full-doc.diff > Index: src/gdb/cli/cli-decode.c > =================================================================== > --- src.orig/gdb/cli/cli-decode.c > +++ src/gdb/cli/cli-decode.c > @@ -580,6 +580,18 @@ add_setshow_cmd_full_erased (const char > return {set, show}; > } > > +/* Add element named NAME to both the command SET_LIST and SHOW_LIST. "to both the command" doesn't really make sense. I'd say "to both command lists SET_LIST and SHOW_LIST", or "to both lists SET_LIST and SHOW_LIST". I see that this text comes from add_setshow_cmd_full_erased, it can be fixed there too. Also, it would be fine to just document the duplicated parameters in one function and refer to that in the other function. Simon