From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Thu, 21 Jan 2021 08:45:12 -0000 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