From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Cn9zCBs/CWDbAQAAWB0awg (envelope-from ) for ; Thu, 21 Jan 2021 03:45:15 -0500 Received: by simark.ca (Postfix, from userid 112) id 119AD1EF80; Thu, 21 Jan 2021 03:45:15 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 389321E939 for ; Thu, 21 Jan 2021 03:45:14 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C61073857C62; Thu, 21 Jan 2021 08:45:13 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 1299C3857C62 for ; Thu, 21 Jan 2021 08:45:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1299C3857C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 31021AAAE; Thu, 21 Jan 2021 08:45:10 +0000 (UTC) From: Tom de Vries To: Simon Marchi , gdb-patches@sourceware.org References: <20210118103101.GA29963@delia> <3dcf9e40-5409-9015-b09b-56e9fcf0e752@polymtl.ca> Subject: Re: [PATCH][gdb/testsuite] Fix gdb.python/py-finish-breakpoint2.exp with -m32 Message-ID: <13409e22-657c-28f3-2b90-bbbd90d68c41@suse.de> Date: Thu, 21 Jan 2021 09:45:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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