From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aBSWDFKAt2fpuTcAWB0awg (envelope-from ) for ; Thu, 20 Feb 2025 14:19:46 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=cisKar+B; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1EA951E105; Thu, 20 Feb 2025 14:19:46 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 391B81E05C for ; Thu, 20 Feb 2025 14:19:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 34CEE385840C for ; Thu, 20 Feb 2025 19:19:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34CEE385840C Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=cisKar+B Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 0616A3858C42 for ; Thu, 20 Feb 2025 19:18:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0616A3858C42 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0616A3858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740079135; cv=none; b=NbpOwV+23NUDWqbLcJSOenGkyVz4JPiVD2j2Pbh9AuPwTpFoctq6BSq/5/2wrvGiKVFLHRnRfRJTDzBKBVcPm24gnilzFfIe1pU0I7+fdE4+mlCGbotK2tERFio0SN/YRogXSCm+7iSJg+OrNMCCFgFlVMMaacgJFfYIW6PUINk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740079135; c=relaxed/simple; bh=RhRpytLR0dbYNNcWIUzw7z5ODZE7o9K25WboTzV9o9A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=adjQ4rruQ5ory9cwzTp5UI++LECuv7Jjps4G1H4V08/sTpymQNN0lBM4BMoKWEB3sGCg5HdTIUHDbI+rpWsl05V8+Mno3XZ2aZeIlFtIB04Jb13csjhKf/f30HGgREIBO2HTr2wCeZBLZQub4QTfUhMIMwpBWFXqglABjHtHQ08= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0616A3858C42 Received: from eig-obgw-5006a.ext.cloudfilter.net ([10.0.29.179]) by cmsmtp with ESMTPS id lAuBtUzOqiuzSlC4UtJec8; Thu, 20 Feb 2025 19:18:54 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id lC4Tts9U38j7elC4UtDLnK; Thu, 20 Feb 2025 19:18:54 +0000 X-Authority-Analysis: v=2.4 cv=VPzbncPX c=1 sm=1 tr=0 ts=67b7801e a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=T2h4t0Lz3GQA:10 a=ItBw4LHWJt0A:10 a=TDl5R864AAAA:8 a=vwEii05QplG1oFuLUuQA:9 a=4IKI_MBedZsHOhguCAbN:22 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rNh70tpMKCf6ZPRak55E2n8mP1VOGZasRrXkQSgJjjk=; b=cisKar+BASp2VTAp3a78ZDtzy/ cbQH8L4SRZt6IvDNamO/ykGXSOu+tPl2BghP3OjuLSip7YuFr1sW/jejvwHVtqYT1xfkPdRUVoQMS C9zBuuX/kOohCMSXDw8aG+c1V; Received: from 97-118-36-154.hlrn.qwest.net ([97.118.36.154]:52988 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1tlC4T-002UEJ-0T; Thu, 20 Feb 2025 12:18:53 -0700 From: Tom Tromey To: Jan Vrany Cc: gdb-patches@sourceware.org, Andrew Burgess Subject: Re: [RFC 0/9] Attempt to unify Python object's lifecycle In-Reply-To: <20250127104435.823519-1-jan.vrany@labware.com> (Jan Vrany's message of "Mon, 27 Jan 2025 10:44:26 +0000") References: <20250127104435.823519-1-jan.vrany@labware.com> X-Attribution: Tom Date: Thu, 20 Feb 2025 12:18:51 -0700 Message-ID: <87y0y0a0h0.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.118.36.154 X-Source-L: No X-Exim-ID: 1tlC4T-002UEJ-0T X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-36-154.hlrn.qwest.net (murgatroyd) [97.118.36.154]:52988 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOQHAy4wEMAUa62/wHqx9o8Lxg9Fq1UC7OZHtVbtpYxSpIkh2d7IE1OEzARr8+j78qoN0yJRnHdBfUgn5D157rk7R6ATLAUJ24LNPOpp6LkgYxNAALpP mrIZKT+7SuDjCde9MUg0yQVPkek3SrcAgyLKwUHP6YBjEv75Y3Bhlts2/410JYTUh881kCBJ/ksorDK3S1SGhL6YDwy2bYP/Ui4= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Jan" == Jan Vrany writes: Jan> My idea was to refactor this housekeeping code into a common class. Thanks for doing this. Jan> It could go further (one can convert gdb.Block too and Jan> gdb.Value and gdb.Value.type and dynamic_type could be Jan> further simplified too) but I decided to stop here. I think gdb.Value might be harder as it has some special requirements. In particular there is code in there to ensure that using the gdb.Value API doesn't cause too much memory retention -- the "temporary" strategy that's discussed in another sub-thread. Also the underlying "struct value" memory management approach is odd. Jan> All in all, I'm not sure this is the best approach and worth Jan> it. By this RFC, I'd like to solicit feedback from experienced Jan> GDB developers on how to move on. Jan> Basically I see following options: Jan> 1) Do not change anything in this area (I'm perfectly Jan> happy with that). Jan> 2) Intern (memoize) Python objects (where it makes sense) Jan> but keep the current approach. Basically first four Jan> commits of this RFC. Jan> 3) Continue working on this. I think #3. I'll send a couple small comments. Tom