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 C2E193858283 for ; Tue, 11 Oct 2022 17:52:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2E193858283 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 29BHq1da019136 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 13:52:06 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 29BHq1da019136 Received: from [172.16.0.64] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 47F3A1E0CB; Tue, 11 Oct 2022 13:52:01 -0400 (EDT) Message-ID: Date: Tue, 11 Oct 2022 13:52:00 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] gdb: fix auxv caching Content-Language: fr To: John Baldwin , gdb-patches@sourceware.org References: <20220920122828.188190-1-luis.machado@arm.com> <20221007204440.3041413-1-simon.marchi@polymtl.ca> <6e3e1ac0-0afc-d053-b48e-a7d20549d1d7@FreeBSD.org> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 11 Oct 2022 17:52:01 +0000 X-Spam-Status: No, score=-3034.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 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, 11 Oct 2022 17:52:13 -0000 On 10/10/22 14:32, John Baldwin wrote: > On 10/8/22 5:39 PM, Simon Marchi wrote: >> >>> I think this approach is fine.  Having two variants of target_read_auxv is >>> a bit verbose, and I'm not sure it's abundantly clear to a new person when >>> to use one vs the other.  That said, these are used rarely, so probably >>> will intuit the right thing by looking at existing uses.  I agree with the >>> idea that the auxv reads during gdbarch_core_read_description should >>> effectively all be "raw" and uncached. >> >> The second one is perhaps not essential, call sites could call >> >>    target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL) >> >> themselves.  But I find it convenient to have this little wrapper. >> >> As to how to know which overload to call, perhaps that can be improved >> with better documentation and comments.  I'm not sure what to add >> though, the problem is so fresh in my mind that it's obvious to me.  So >> I'm open to suggestions. > > I don't have any good suggestions.  Also, FWIW, the BSD bits are all > fine with me. > > --  > John Baldwin Ok, thanks. Simon