From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EaNbHn1ChmpFXTEAWB0awg (envelope-from ) for ; Wed, 19 Aug 2026 19:55:41 -0400 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=Rf8Qjjr9; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 77F781E0A3; Wed, 19 Aug 2026 19:55:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 12F551E09B for ; Wed, 19 Aug 2026 19:55:41 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 935284B99F5B for ; Wed, 19 Aug 2026 23:55:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 935284B99F5B 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=Rf8Qjjr9 Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id 29CA74B9DB54 for ; Wed, 19 Aug 2026 23:54:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29CA74B9DB54 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 29CA74B9DB54 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787183684; cv=none; b=GPEAB9QOeHchkXvn5QniZIXxwTknvspX3xdUXGY+xYACi+j7GCOwCSYim1lhL8iqcvOfowiOSYaRQUj2IRqzcWV9w4fFroc9De1HCJWKwOGnZmHjn2o5pvkOFEJh7hbZFyk/R7ZdpZPiWY/uiH/klEswf0orPBmDB9M9s1P2AZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787183684; c=relaxed/simple; bh=aNCuCVKL2ij2vFIAW5HAiRJNKbQec1iNr34778NvQyY=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=p+9ng2jNbeCSwfy7e3HQyavvCq/alDpTvT7jQFZM5D6sTTgfoSRFQfn9fGuTqA6S4OEI05nTC8dB2DtSJOAmoIo+rx5c0xYJTSHXQaqlKEaNxZHOeTkE5fnhIjuNCiPgwcaGFQbZTs2y5gdQnTOqZ5x1fx9hJ0KUMOMX2q6DWD0= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Rf8Qjjr9 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29CA74B9DB54 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id wowUwrBu4aC0Uwq7Hwetzl; Wed, 19 Aug 2026 23:54:43 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id wq7FwaePJRY4Iwq7FwRisd; Wed, 19 Aug 2026 23:54:42 +0000 X-Authority-Analysis: v=2.4 cv=WNl/XmsR c=1 sm=1 tr=0 ts=6a864242 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=Mho9wrc-K3KnK4B5htkA:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PV62wX0JCARxQ9M+miSnJ/Ygt5sDHMQ46QQuNm6DArQ=; b=Rf8Qjjr9v8eVe3dBH5y0Cj0LI4 9s6JA2N/lW66iRs/ukMmjDopOoh6lrjAD8hajohWzR2p2nqnz8gLGNlf5JASIZ3GV35Xx6T5NqlqG Ba4/G6SIDj1BEYK8ZxHq/DTWy; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:36824 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wwq7F-000000020o1-15yD; Wed, 19 Aug 2026 17:54:41 -0600 From: Tom Tromey Subject: [PATCH 0/4] Convert py-frame.c to Python safety API Date: Wed, 19 Aug 2026 17:54:38 -0600 Message-Id: <20260819-python-safety-frame-v1-0-563cb6b9e7a6@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAD5ChmoC/x3MwQ6CMAyA4VchPdsIBEV8FeOhjI71wEbaxUgI7 870+B3+fwdjFTZ4Vjsof8QkxYLmUoELFGdGmYqhrdt7/WgGXLccUkQjz3lDr7Qwun64kXeu6yc PpVyVvXz/19e7eCRjHJWiC79XUpklXheyzArHcQJNKHS7hQAAAA== X-Change-ID: 20260819-python-safety-frame-c795afcc47df To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 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: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wwq7F-000000020o1-15yD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net ([192.168.122.1]) [75.166.225.82]:36824 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKl7s/jnrpO8egzapYkErP2EY2wQZ68pSFgECvKqlId8kKBetRpZSIHINzVmMcJZafjiiq6L0v2edswRVTkCQpqNxwH7Vg5+zm6hVfuPxowXZCLviiZk 7EYanCJ0Lw2yUSfauVYkyvJORLg+mcVawqdQ/eeaoCvu9UKE095hyoM03d3fRyE7kbG4Z2Zro9DTn2vaUJFxyg5VOvV2JmISL84= 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 This series converts py-frame.c to the Python safety API. I've split it into multiple parts to make it perhaps a bit easier to review. Often I find these patches pretty hard to read, since they involve converting a bunch of functions into methods, making them fairly messy. A few FIXME comments are added; as with other cases, these can all be removed once the conversion is complete. At the current rate this may be a while. Tested on x86-64 Fedora 40. Signed-off-by: Tom Tromey --- Tom Tromey (4): Basic safety conversion of py-frame.c Convert gdbpy_newest_frame and gdbpy_selected_frame to safety API Convert gdbpy_frame_stop_reason_string to the safety API Convert frapy_richcompare to safety API gdb/python/py-frame.c | 852 +++++++++++++--------------------- gdb/python/py-inferior.c | 24 +- gdb/python/py-safety.h | 53 +++ gdb/python/python-internal.h | 7 +- gdb/python/python.c | 12 +- gdb/testsuite/gdb.python/py-frame.exp | 3 + 6 files changed, 408 insertions(+), 543 deletions(-) --- base-commit: 07ee9e316ab6d53b5ed1aae8fe7448a559abe4be change-id: 20260819-python-safety-frame-c795afcc47df Best regards, -- Tom Tromey