From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4rlCN/zmE2DCGwAAWB0awg (envelope-from ) for ; Fri, 29 Jan 2021 05:44:12 -0500 Received: by simark.ca (Postfix, from userid 112) id D604C1EF80; Fri, 29 Jan 2021 05:44:12 -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 28F871E939 for ; Fri, 29 Jan 2021 05:44:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB799388E823; Fri, 29 Jan 2021 10:44:11 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id A358D3858009 for ; Fri, 29 Jan 2021 10:44:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A358D3858009 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 B63F2ADE5; Fri, 29 Jan 2021 10:44:08 +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> <4c0d6cdf-d1aa-2c0e-e99c-092ea8ae0aac@polymtl.ca> From: Tom de Vries Message-ID: <8686a79b-cee1-6fee-6271-9b01b124dfb0@suse.de> Date: Fri, 29 Jan 2021 11:44:08 +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: <4c0d6cdf-d1aa-2c0e-e99c-092ea8ae0aac@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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:20 PM, Simon Marchi wrote: > On 2021-01-28 1:15 p.m., Tom de Vries wrote:> 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, and to be clear I don't have anything against what you suggest, > the test was lacking proper documentation before you touched it. Right, nevertheless I think it was good to go over this and try to make thing more readable. So, thanks for the review :) Committed with the state machine part removed. Thanks, - Tom