From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8394F3857818 for ; Mon, 7 Mar 2022 19:59:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8394F3857818 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-261-N1Sy3GftOua_gKUTlMwB5A-1; Mon, 07 Mar 2022 14:59:32 -0500 X-MC-Unique: N1Sy3GftOua_gKUTlMwB5A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B077A801DDC; Mon, 7 Mar 2022 19:59:31 +0000 (UTC) Received: from [10.97.116.31] (ovpn-116-31.gru2.redhat.com [10.97.116.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B5EDB4BC7D; Mon, 7 Mar 2022 19:59:27 +0000 (UTC) Message-ID: Date: Mon, 7 Mar 2022 16:59:24 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 01/11] change gdb.base/skip.exp to use finish instead of step To: Andrew Burgess , Pedro Alves , gdb-patches@sourceware.org References: <20220126195053.69559-1-blarsen@redhat.com> <20220126195053.69559-2-blarsen@redhat.com> <50f75fc6-df4b-8408-4843-7d3363ed6f1a@palves.net> <871qzkz4uc.fsf@redhat.com> From: Bruno Larsen In-Reply-To: <871qzkz4uc.fsf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 07 Mar 2022 19:59:36 -0000 On 3/2/22 13:39, Andrew Burgess wrote: > Pedro Alves writes: > >> On 2022-01-26 19:50, Bruno Larsen via Gdb-patches wrote: >>> skip.exp was making use of a fixed amount of step commands to exit >>> some functions. This caused some problems when testing GDB with clang, >>> as it doesn't add epilogue information for functions. Since the step >>> commands weren't testing important features, they were changed to finish >>> commands. >> >> I'm not a fan of _completely_ avoiding stepping out of functions, due to some >> compilers misbehaving. I mean, if we're going to do this throughout >> the testsuite, then we should at least have one testcase that is explicitly >> about stepping out of a function with step, one that exhibits the problem, >> and we can concentrate the xfails there (and we should press the compiler >> folks to fix it). I'm not sure we have one. If we do, you should mention it >> explicitly in the commit log. Afterall, users will be doing this too. > > Agreed, and there's probably scope for a proc in lib/gdb.exp that does > something like "step until we reach a source line matching REGEXP", > which could be used instead of finish in some cases. > > Thanks, > Andrew > Interesting suggestion. I'm not sure "step until we reach a source matching REGEXP" is the best approach, since anything off in that regexp means that we might be single stepping until the program exits - a bit too time-consuming for my liking. I think that a proc that single steps until it exits the current frame. Does this sound reasonable? -- Cheers! Bruno Larsen