From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 075FB3857C4B for ; Mon, 10 Oct 2022 18:33:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 075FB3857C4B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4MmSG64bpZz3j8Z; Mon, 10 Oct 2022 18:33:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MmSG63jZmz3FmG; Mon, 10 Oct 2022 18:33:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665426782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CYcQbLrJPgNuNLOFyKtndoLTWlTsEJt0HL3On2Eh1QA=; b=LbNbsuQ1U5VzwaEWCH6GHMZnjcPBhR/+JU+Ax2BfIOzuPKIhiEnvKrcAc1ZlIqgWuak3gP yD4XVk6I1Yu1sr0K+zAJupmDSEmk/Nqolpf/F2o9j/1g0/q8cBnb/cjz3KB22QG7lUczFr qtiVmQKO9oLLCPvKsdfg50VOpsTYVb4GlaIP/0Orsme43dPXJl9NN+CN47N3EsX+g3VCHQ 50sZxpTwYC2iNOEApdgQ5OdbvNQZAJsFI/nDPvhbCu1cB+NhAjaf/qMQWIfycd8XnJeD5i zoctHg18/Ni9ksBqcoH/JQkojg8yxSDuGN8PMHzER+h0fN5bHoEOhf10ovNIhQ== Received: from [IPV6:2601:648:8684:ad0:1528:5899:9bc1:9c73] (unknown [IPv6:2601:648:8684:ad0:1528:5899:9bc1:9c73]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MmSG55ylMztrB; Mon, 10 Oct 2022 18:33:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 10 Oct 2022 11:32:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH] gdb: fix auxv caching Content-Language: en-US To: Simon Marchi , 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: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665426782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CYcQbLrJPgNuNLOFyKtndoLTWlTsEJt0HL3On2Eh1QA=; b=agNJMAbgR48wdOFhGY5BttUp6FQtnwO+vDA0h8hd+yttHHuJ8cGw+bizzZ0Q9LGg8Pjw97 Q6hZJIKhZ1XtFLq+M9gDNmRbcisqXj34NFxkKsFol3vJqD9lvPq1QQfNkhZS1hNoEsDorG a0GlPNxPo48ngayOagh8d9nIHvy0lh2QYEba8ERT9PCD6KuXZF22QsYwz9Qe2Z4cXd+Zvv VyH8z4qGCG7rSEIV2zSQHlOYSYnVnOgOfTVNH051Sj+f5lWtzS/mGzzg3UeCvQIHX9Gm+c Jn06l2oO4hrLqxcm4WRG9BsOSVrg4ZxBC+Wm4ikSyQVyvJ4W60WNg5l8f7OHCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665426782; a=rsa-sha256; cv=none; b=odEoKCPI+yYZGdkR5rWhS7pbA5bnOrw+iHUnHl4feHNWsm129LkR8CxQEZ6Ih5Sfe9xR2W sMMLIncYcuL1ydYqTFX/uI7ji7/lC8K3LDn1Hp9ZuT7F00S9Z87mRws5nC+clgKcWR+oob +HEuaSH13Kfi4oXHR1Rtu0n267kpCxRMSg4PHUW6idPX4E8myjUaWfN3CdAtEqAxoZVZAE rw0QZSNUZqpBB08nq4i6YCgNSMLh55RLmx2oFn3X3zUez/T54LgRL5Zz03EtL8t2HcBooa QyoDLtNV79fWWN7Zza4sd1hG6um/OW/aYtEVt++/sTyQYZZ9gThT2xn4eOwXLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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: Mon, 10 Oct 2022 18:33:04 -0000 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