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 CF24F3858D20 for ; Fri, 20 Jan 2023 17:44:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF24F3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca 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) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 158E21E0D3; Fri, 20 Jan 2023 12:44:00 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1674236640; bh=jiDcYBdnTLy/MxkPVodxuAxQk9kE5drllB+7RpUNMxA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D5a5tb3gZs6x7ukm5Aa/zFOG2qCx+LfGu/iWQbr3p72EtQZEx2T+z58ES0rK50kIQ gbmvGp834xPemjwB/dwB5BszZa8rVpoAa5l/cz2s2YkkLPlidl4cFviKkcKOi/cX2C WwgMJEJpz0JZHN57RyCJVrunSUPI1mAcWDrA2OBI= Message-ID: <5781991c-70fd-0219-8c0d-940d648ad9de@simark.ca> Date: Fri, 20 Jan 2023 12:43:59 -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 v3 1/2] gdb: dwarf2 generic implementation for caching function data Content-Language: en-US To: Luis Machado , Torbjorn SVENSSON , gdb-patches@sourceware.org Cc: tom@tromey.com, Yvan Roux References: <20230119102948.3069226-1-torbjorn.svensson@foss.st.com> <1ca2f916-21be-1627-7cc8-50da1a773cb8@foss.st.com> <05b54824-e13d-da77-1244-39dc65af3056@simark.ca> <46bf0f45-6469-2d1d-f6c0-6ae528b749d3@arm.com> From: Simon Marchi In-Reply-To: <46bf0f45-6469-2d1d-f6c0-6ae528b749d3@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.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 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: > Maybe not a solution for now, but can't we use something like the trad-frame structs to cache > values/locations of registers for a given frame? It's true that it's very similar, but I don't immediately see how I would use it in this case. The trad-frame stuff saves the info in its own format, whereas here it would be nice to cache struct values directly. And it wouldn't be optimal for trad-frame to cache values, because we would end up allocating values that might not be needed in the end. However, I see that trad-frame uses an array of size gdbarch_num_cooked_regs. It would make sense to use that here too, instead of a hash table, it makes the lookups O(1). Simon