From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gproxy3-pub.mail.unifiedlayer.com (gproxy3-pub.mail.unifiedlayer.com [69.89.30.42]) by sourceware.org (Postfix) with ESMTPS id 152CD3841473 for ; Sun, 5 Jun 2022 16:29:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 152CD3841473 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw14.mail.unifiedlayer.com (unknown [10.0.90.129]) by progateway5.mail.pro1.eigbox.com (Postfix) with ESMTP id 7419710047F3F for ; Sun, 5 Jun 2022 16:29:06 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id xt7inrgK9hWk0xt7inVQaz; Sun, 05 Jun 2022 16:29:06 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=IrfbzJzg c=1 sm=1 tr=0 ts=629cd9d2 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=JPEYwPQDsx4A:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=CCpqsmhAAAAA:8 a=ED8Qnrno0TXhX1VWWS8A:9 a=ul9cdbp4aOFLsgKbc677:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type: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=4fkVynlF7H+HU/PoYZFTrwPY9pqQf9vWPl1fqtTeMZg=; b=CQc9lJCKxq0gQYta9X5h7x2f21 xtpahmLNv/mdX8mLBW+/N68tAa0QyqgnEPdUqPBWl9zCgUqdjDE2sYI2Er/RhdrE134bg2LUz3I4H eI0H/sSYSZlxoSwgC0I/weyib; Received: from 71-211-171-143.hlrn.qwest.net ([71.211.171.143]:45640 helo=prentzel.Home) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nxt7h-000eBb-Sm; Sun, 05 Jun 2022 10:29:05 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove dead code from py-finishbreakpoint.c Date: Sun, 5 Jun 2022 10:29:04 -0600 Message-Id: <20220605162904.1602810-1-tom@tromey.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 71.211.171.143 X-Source-L: No X-Exim-ID: 1nxt7h-000eBb-Sm X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-171-143.hlrn.qwest.net (prentzel.Home) [71.211.171.143]:45640 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3030.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 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: Sun, 05 Jun 2022 16:29:08 -0000 PR python/16324 points out that comparing a frame id to null_frame_id can never succeed, and proposes simply removing the dead code. That is what this patch does. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324 --- gdb/python/py-finishbreakpoint.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index df54d3643ab..e919899bc81 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -205,12 +205,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) "be set on a dummy frame.")); } else - { - frame_id = get_frame_id (prev_frame); - if (frame_id_eq (frame_id, null_frame_id)) - PyErr_SetString (PyExc_ValueError, - _("Invalid ID for the `frame' object.")); - } + frame_id = get_frame_id (prev_frame); } } catch (const gdb_exception &except) -- 2.34.1