From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 1A7853858CDA for ; Thu, 9 May 2024 10:02:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A7853858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A7853858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715248952; cv=none; b=dBtb/GGG79G3hdhKFhv9Chmg4e/SzmuI0a5Izk87qkYcIH5WzKq1rx5i18r8m9ceF8BErXt7nKqQ44zrvgOI/2V4z0S+p4iIcWW7baRvIkNflVgFSxZ29KeffjDRB7fgmvWfuzM/SiiFLl7Zohbgjhdn9TGFWh2wVR/aex2NfQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715248952; c=relaxed/simple; bh=bz2ut/k2aRi7DFgdyXi+Cf/Eelzo5dzltKjKaaXUX5I=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=cAbGY8E+4+wMeWbkV6MPKrxdfyCSPgLGZrGRjh5Qlv6GpPYvy4/z0ayinzUIsOXbhcZL69cKmZExHrzinmRAF1poXYtJHUQ/V5oFXIehEEf6nUu3YBv1Q+CwDJApSYl02IqkBpKfEZLQ9f01FtNeI8kHpo1uKobRZxjSVzkiHyA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F34435FC4F; Thu, 9 May 2024 10:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715248950; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s4zj9Ngx5W4mIsIvx0ywEs0SBQSBV2XIoo+JhFDbeMs=; b=JciJmrR8HmxyXHWSIryfBdDtYcErL26uNyYcMWZLlHuH1S93ZuPYNwUliP7ysA+laGibf4 o21KwBeUqXLVHPhqMz622WCseNYkgZFZ9f4B2T7wo4jyZYNBt/Tj4QGaK+ZGxstT7BaHIf wZx2IgvW+QsYDG3XHC5RBwW6RKglN30= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715248950; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s4zj9Ngx5W4mIsIvx0ywEs0SBQSBV2XIoo+JhFDbeMs=; b=h3h9UV4fEjZq9npCMnyHpFhEWFMxN4AZUG9+CGv4ZgRN1bSt09iMRZcjwsz/mDa3Sj1iMY 2aRYPMEXLY90H9AA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=hg0gnKv8; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=5qzijEu1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1715248949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s4zj9Ngx5W4mIsIvx0ywEs0SBQSBV2XIoo+JhFDbeMs=; b=hg0gnKv88LJutNLufWBCtYUj3L7pJwMZYgOaMtFMVuSatdiczYzwV4OeOXlJzHTAqQAp6A x1ywRxJyjdeg5oLzPvX7wiNgDWh6xvF2IIRgPTjZ+P3TEBoOW759jZ8SV9fYKYuzyQk4Zf v8Hwk3f1NxFbsB2ChUNtwBMth4/K7PU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1715248949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s4zj9Ngx5W4mIsIvx0ywEs0SBQSBV2XIoo+JhFDbeMs=; b=5qzijEu1DECmTVc2TqEbQq/3c97B+p61jeSPLuCRyaZ4Y53HG+TdM3g9bFex2NJXW/erNu UEM7El4enG6clcCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C3CC113941; Thu, 9 May 2024 10:02:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id zN1SLjWfPGZwOAAAD6G6ig (envelope-from ); Thu, 09 May 2024 10:02:29 +0000 Message-ID: Date: Thu, 9 May 2024 12:03:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/python] Make gdb.UnwindInfo.add_saved_register more robust To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240302123653.16923-1-tdevries@suse.de> <87y18k47yr.fsf@tromey.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87y18k47yr.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.23 X-Rspamd-Action: no action X-Rspamd-Queue-Id: F34435FC4F X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.23 / 50.00]; BAYES_HAM(-2.73)[98.81%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MX_GOOD(-0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:email]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP 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 5/8/24 17:52, Tom Tromey wrote: >>>>>> "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. Hi Tom, thanks for the review. Submitted fix here ( https://sourceware.org/pipermail/gdb-patches/2024-May/209032.html ). Thanks, - Tom