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 C53673858CDB for ; Sun, 24 Dec 2023 15:35:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C53673858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C53673858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703432157; cv=none; b=XLuOPZK3G8tV4GSqA7oN3TrmoLpf6yIhgzEMmj/WyhApnN1eEvC7pBZsTtZ0cbCL8ec3NLH1KoBX7YCcPI7eKXfn+K+fhYeJCNfZWn6I9qIxL5pghh7wqsTPP53FxkbmdrrtnyOyjuwgXE66W4bxWet9UEdrKXoitn2DV+R10gM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703432157; c=relaxed/simple; bh=aGeSyqqlQduFaLmTIOyAOGqyi3RTdJKDMq/NSHDVcxo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=hZGvDpb6utc7GoU76OX+fLZqap5wJlKYZAFcIOPL40+2Vv9f2Xqr4L1WiyQlPkDSCkmSO+i2ZJiF4FA8k4VGRz/eDg+PcGF5jYkgscoALsrM2NyaxrqymriH0VkSrBaDx8WkrXlIemSkc/1BpUKJLVjxNBwSINCpvMYV329+uSI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1703432154; bh=aGeSyqqlQduFaLmTIOyAOGqyi3RTdJKDMq/NSHDVcxo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=S5ypsV1L09Tb5hf1zl+Zf4d0BM5qQwfAyYYROqMDGqkcMMYjEYYYo8pmSPGUlaiAe jDXyXNExJ4KYoQ+5JLB8URgCd84joJ8DBzBG58GrOdA6Jzo2aKA1hqZNCBn0LN8Q5r tX7Alqlrm07d/7SJFnIY+Bsa+9fHCSL3JStLH3Og= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5142D1E0AC; Sun, 24 Dec 2023 10:35:54 -0500 (EST) Message-ID: <656d2c7c-a694-447d-95b0-5bc96beaafb8@simark.ca> Date: Sun, 24 Dec 2023 10:35:53 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/9] gdb: remove VALUE_NEXT_FRAME_ID, add value::next_frame_id Content-Language: en-US To: Tom Tromey Cc: Simon Marchi , gdb-patches@sourceware.org References: <20231221191716.257256-1-simon.marchi@efficios.com> <20231221191716.257256-8-simon.marchi@efficios.com> <87frzu18qr.fsf@tromey.com> <443a741e-661e-42ea-96a5-62911ccc6a63@simark.ca> <87ttoayxuo.fsf@tromey.com> <8d9712c7-a722-4b57-b9e5-10beb57f4653@simark.ca> From: Simon Marchi In-Reply-To: <8d9712c7-a722-4b57-b9e5-10beb57f4653@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 2023-12-22 12:06, Simon Marchi wrote: > > > On 2023-12-22 12:02, Tom Tromey wrote: >>>>>>> "Simon" == Simon Marchi writes: >> >> Simon> I'm not sure I understand, which function do you think should return a >> Simon> frame_info_ptr? >> >> value::next_frame_id (though also with a new name). >> >> value::fetch_lazy_register can just access the frame_id directly if it >> really needs to. >> >> I don't feel super strongly about this. > > Ah ok I see. Well, even value::fetch_lazy_register does call > frame_find_by_id, so I guess it would make sense, it wouldn't be a > pessimization. So, there's one call in fetch_lazy_register that just wants the frame id, the call on `new_val`. So I will leave it as is for now. I had the idea of making it so that value::m_location stores a frame_info_ptr to the next frame, instead of a frame id. Now that frame infos are reinflatable, it should be safe to do so. And then we could return a frame_info_ptr at no additional cost. But a first step would probably be to convert the m_location union to a variant, because we need the frame_info_ptr ctor and dtor to be called. Simon