From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dNEzDjP/EmDCewAAWB0awg (envelope-from ) for ; Thu, 28 Jan 2021 13:15:15 -0500 Received: by simark.ca (Postfix, from userid 112) id 2B34E1EF80; Thu, 28 Jan 2021 13:15: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=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE 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 1BC041E945 for ; Thu, 28 Jan 2021 13:15:14 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9941C39B8C80; Thu, 28 Jan 2021 18:15:13 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 3C07E3834434 for ; Thu, 28 Jan 2021 18:15:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3C07E3834434 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 4E74CAC48; Thu, 28 Jan 2021 18:15:10 +0000 (UTC) Subject: Re: [PATCH][gdb/testsuite] Fix gdb.opt/solib-intra-step.exp with -m32 and gcc-10 To: Simon Marchi , gdb-patches@sourceware.org References: <20210126180312.GA7860@delia> <8713098d-e196-bf9d-3b8f-a8d2920e7caa@suse.de> From: Tom de Vries Message-ID: Date: Thu, 28 Jan 2021 19:15:09 +0100 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: 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/28/21 7:04 PM, Simon Marchi wrote: >>>> @@ -89,7 +89,7 @@ gdb_test_multiple "step" $test { >>>> exp_continue >>>> } >>>> -re -wrap "get_pc_thunk.*" { >>>> - if { $state != 1 } { >>>> + if { $state != 0 && $state != 1 } { >>>> set state -1 >>>> } else { >>>> set state 2 >>>> >>> >>> I don't really understand what happens here, what state value means what. >>> >>> A bit of commenting would help. >> >> I tried to add comments but didn't manage to come up with something >> sensible. >> >> Instead, I simplified gdb_test_multiple to just track the order of >> events, and then added a few asserts about order of events. >> >> I hope this clarifies what the test is trying to do. WDYT? > > Hmm, it's still not clear to me what the intention of the test is. It's > not clear what kind of good or bad behavior from GDB we are looking for. > That intention needs to be recorded in a comment, otherwise, I can't > tell if the code matches what we want (since I don't know what we want). > I kind of understand now that we do a step, we want to get until the > "first-hit" line (or "second-hit" in the second case), but it's possible > that we land on intermediary states, which are acceptable. But there > also seems to be an ordering component? Why is that important? Why > don't we simply "exp_continue" when seeing "retry" or "get_pc_thunk", > why bother recording anything? Ah, I see. Well, it's an attempt to be precise about what we accept in the test. Much in the same way that two subsequent gdb_test do that. But yeah, I don't think it's really important, so I can drop that part. Thanks, - Tom