From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 82DB4384AB41 for ; Wed, 8 May 2024 15:52:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82DB4384AB41 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 82DB4384AB41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715183537; cv=none; b=qj+Rr9+sWDzWxvGFAYZmCpPsU89WqVs4wjFoozv6EbQsV3rszShMSuzU0TXWW98HQYUFYuX0FOz4L0Eyvx4VxrhXVhl41L9dVVrKUX1Bw+YfYHHS02xeXt+C+rQNjU7SrpwtUnXoB6Yhwukk3H4iVcSIEXN8JYcnAa+RMYS0sAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715183537; c=relaxed/simple; bh=gs0bBZZztazDRQQtbL+0YQ+zACAYo4h9AXlzwNemjho=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rAerWZGkgdW9lUjD/uKlXzwOxlkkj0adG6h3yd3SC0mMqjryyJyA0M6SBNU0s/M5qhMquwnyalWqHum4h90XqWbq7UqFIFpM5m3Z5laO0WYdGlZHy41mxlZSxQq3h//bWPqCjAdA+Q9hQzflujn6oONMU7WhuHi5VP83qKOXIXc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6010a.ext.cloudfilter.net ([10.0.30.248]) by cmsmtp with ESMTPS id 4hytsBHxkSLKx4jaYsXSwB; Wed, 08 May 2024 15:52:14 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 4jaXsgJYfF4Xp4jaYsZEKQ; Wed, 08 May 2024 15:52:14 +0000 X-Authority-Analysis: v=2.4 cv=UpZlNfwB c=1 sm=1 tr=0 ts=663b9fae a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=TpHVaj0NuXgA:10 a=Qbun_eYptAEA:10 a=dyxEBEi-9u2rFGZY2AQA:9 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=B0qv5GQPOVFQN9P3TeQOMnM1EEeddbkwUPF4Ttm1Hgk=; b=RJbKYBKSAWsnw48dIXY9enQuVg uSiGU0N2hP6uidYhN64uyuMnj40p5LFKvepPk8OMlRrgIB4Bo1+4xnRRKbAoFqwn6fSl/lcanEWOL InD8n68s1gIxSaCX9HPEkEx5w; Received: from 97-122-86-252.hlrn.qwest.net ([97.122.86.252]:49596 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 1s4jaX-000yfy-21; Wed, 08 May 2024 09:52:13 -0600 From: Tom Tromey To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb/python] Make gdb.UnwindInfo.add_saved_register more robust In-Reply-To: <20240302123653.16923-1-tdevries@suse.de> (Tom de Vries's message of "Sat, 2 Mar 2024 13:36:53 +0100") References: <20240302123653.16923-1-tdevries@suse.de> X-Attribution: Tom Date: Wed, 08 May 2024 09:52:12 -0600 Message-ID: <87y18k47yr.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.122.86.252 X-Source-L: No X-Exim-ID: 1s4jaX-000yfy-21 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-252.hlrn.qwest.net (murgatroyd) [97.122.86.252]:49596 X-Source-Auth: tom+tromey.com X-Email-Count: 32 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPKRcnOvx7AQ0tomM55DxxmSo3GvC/8jQkuv7lypeoOxPUFaiq/u94AzNd5w7F0t3dl9RTOClV2JZt/J9Cm/x4fkxuslTgXHas+s+a97g2Tk8EDK3kP2 WTBnlfFmfIrau1I8cSnopy2ZBDTJmCE3bc39IPI7ed26xB3wz1gnNz9yGujwwjXsiDSTyGRSTlxTajQzpvHRXEUkaC5eEUhk8jk= X-Spam-Status: No, score=-3014.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Tom" == Tom de Vries writes: Tom> @@ -362,6 +362,18 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args, PyObject *kw) Tom> return nullptr; Tom> } Tom> + if (value->optimized_out () || !value->entirely_available ()) Tom> + { Both of these seem to have cases where they can throw an exception. In the Python layer, gdb code that can throw normally has to be wrapped in a try/catch, as throwing across the Python boundary will cause crashes. I don't know whether exceptions can actually be provoked here or not. Tom