From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 1B5B73858D1E for ; Wed, 20 Apr 2022 15:15:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B5B73858D1E 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 C17B81E15D; Wed, 20 Apr 2022 11:15:41 -0400 (EDT) Message-ID: Date: Wed, 20 Apr 2022 11:15:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 1/6] Add accessors for symbol's artificial field Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220420145013.3307418-1-tom@tromey.com> <20220420145013.3307418-2-tom@tromey.com> From: Simon Marchi In-Reply-To: <20220420145013.3307418-2-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 20 Apr 2022 15:15:43 -0000 > @@ -1369,6 +1369,18 @@ struct symbol : public general_symbol_info, public allocate_on_obstack > m_value.chain = sym; > } > > + /* Return true if this symbol was marked as artificial. */ > + bool artificial () const > + { > + return m_artificial; > + } > + > + /* Set the 'artificial' flag on this symbol. */ > + void set_artificial (bool artificial) > + { > + m_artificial = artificial; > + } Since this is a boolean / flag, I would name those "is_artificial" and "set_is_artificial". To follow GDB's conventions it should probably be "artificial_p", but I always found this scheme awkward to read (vs is_foo, which just reads like plain english). LGTM in any case. Simon