From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EhQ0BkmOCWAHCQAAWB0awg (envelope-from ) for ; Thu, 21 Jan 2021 09:23:05 -0500 Received: by simark.ca (Postfix, from userid 112) id 0D6A51EF80; Thu, 21 Jan 2021 09:23:05 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 956071E940 for ; Thu, 21 Jan 2021 09:23:04 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A110E386F82E; Thu, 21 Jan 2021 14:23:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A110E386F82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1611238983; bh=5Sfmp7CjV37mhNkNSmlTyikTE7fUI/xeOECjv4NCXZk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=lRPFhLSjUOaXqoPU9Bik5mDPkbFl0JZhh3gv1bBAgqxCUI/5dhI6M5kHd21WsqLuB saN+4w6hwGxRHTHuxL6rN6RXfAsQkYpHwFPxUX6YZlQlWfTSiA4nUTTanX34FMaVGN 35bGXLaJrOFdDmZ2qnq8hG9YslsOTb0mTmz7GSmk= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 43ED3386F465 for ; Thu, 21 Jan 2021 14:23:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 43ED3386F465 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 10LEMt5S009361 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Jan 2021 09:23:00 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 10LEMt5S009361 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 219E31E940; Thu, 21 Jan 2021 09:22:55 -0500 (EST) Subject: Re: [PATCH][gdb/testsuite] Fix gdb.python/py-finish-breakpoint2.exp with -m32 To: Tom de Vries , gdb-patches@sourceware.org References: <20210118103101.GA29963@delia> <3dcf9e40-5409-9015-b09b-56e9fcf0e752@polymtl.ca> <13409e22-657c-28f3-2b90-bbbd90d68c41@suse.de> Message-ID: <9dc1b1bc-0c3e-04a4-cf86-aa1eab8f2f84@polymtl.ca> Date: Thu, 21 Jan 2021 09:22:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <13409e22-657c-28f3-2b90-bbbd90d68c41@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 21 Jan 2021 14:22:55 +0000 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2021-01-21 3:45 a.m., Tom de Vries wrote: > On 1/21/21 9:29 AM, Tom de Vries wrote: >> The different outcomes for -m32 and -m64 are both valid given the >> semantics of FinishBreakpoint, which is "set at the return address of a >> frame". It all depends where that return address is. There is no >> guarantee that the return address is an insn that uniquely represent the >> function return control path. > > And, reading the documentation: > ... > Function: FinishBreakpoint.out_of_scope (self) > > In some circumstances (e.g. longjmp, C++ exceptions, GDB return > command, …), a function may not properly terminate, and thus never > hit the finish breakpoint. When GDB notices such a situation, the > out_of_scope callback will be triggered. > ... > this may be somewhat misleading or unclear, given that it's possible (as > the -m64 case demonstrates) that both: > - the function does properly terminate, and > - the finish breakpoint still hits (meaning the stop method is called). > > Thanks, > - Tom > I think don't see how FinishBreakpoint can be useful with that kind of inconsistency. Given that an exception is thrown in both cases, and the throw_exception_1 call frame never properly terminates, it seems obvious to me that out_of_scope should be called both times, and stop should not be called, both times. Simon