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.133.124]) by sourceware.org (Postfix) with ESMTPS id 90CAD385828E for ; Tue, 17 Jan 2023 12:35:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90CAD385828E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673958958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZO125XLwX54MbFjsJPAKEEASq8IhT8DSGAr1NXyNiTQ=; b=GJxffaPQWaXsgVX+m9CbsFo+OnnW8X5Icom3FOuu1Gw7bG636VMa0i0qC3ZWApASWazfvn FJ34c2Qen05wOlRPPWzgdzAZbeyHJXe5JvO8aA8nuvFV79ysb4dDaH1meG+jS4QLJF4Qha BynTuP7SjS6txST7+GLEHvZzWvzLBX4= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-612-Dr6SnTPHMSCjlOany98voQ-1; Tue, 17 Jan 2023 07:35:57 -0500 X-MC-Unique: Dr6SnTPHMSCjlOany98voQ-1 Received: by mail-qv1-f70.google.com with SMTP id nh4-20020a056214390400b004e36a91ecffso15898807qvb.19 for ; Tue, 17 Jan 2023 04:35:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZO125XLwX54MbFjsJPAKEEASq8IhT8DSGAr1NXyNiTQ=; b=dpqhUZ9Ug0Nt8YOBrnMCtrHfNmtIsNeFsjGU2YV0A3ZkHtvuGxHCt1VU/tpcoxvdAW 8ML6kp+D3ueX9CUM9nRmPU0FDJUtJUhS9BcHlHB7F/L4z9Ia5f7VSnDhmgRy9i7OuQhS YfIQeJ0UurSZfhY3RJF2Sprw7IcVrnwlqJWg3EfMOyVy3qx2iV4hT+FhA3o7hfNvkq8E luhoH61rK3oeRT/YyVGWsexQGaE2+Hp4mylqa43r+yvbOdYeiBzd3RFWHJ01rSFFebIC 00vj30DkhwRakBDfUnSUJ5Dttl9sX3Hq/1M0TapS56yU1FAxs9HRHbluu+wX4cEDB/oZ ZYEw== X-Gm-Message-State: AFqh2kqTlfmLygJM+0PS/wdmuiSnSsGGgZ69tVN08rvQ0/JEkpcbjtma 830BR6Xt+rJlOELVPH59qdQPmR/H15V6UOBxL4CJIooEKaHM1mjVUSwjsjgZF1+mlq17lVdvetd DBDG/jGcLCqhrwMJbDVR2Fw== X-Received: by 2002:ac8:478c:0:b0:3a8:10c4:4ae with SMTP id k12-20020ac8478c000000b003a810c404aemr3429621qtq.49.1673958956798; Tue, 17 Jan 2023 04:35:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXt4hZV9/Ww1HKAnEA6exgGSa94jnBLkCyLnnx1Va50MI4DQALyA4jrvPswUGrHWHygcvOW2vg== X-Received: by 2002:ac8:478c:0:b0:3a8:10c4:4ae with SMTP id k12-20020ac8478c000000b003a810c404aemr3429599qtq.49.1673958956544; Tue, 17 Jan 2023 04:35:56 -0800 (PST) Received: from [10.43.2.105] (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id cg5-20020a05622a408500b003b6382f66b1sm1698458qtb.29.2023.01.17.04.35.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Jan 2023 04:35:56 -0800 (PST) Message-ID: <58cebd1a-7883-fbc6-ac94-c67293f8fc8d@redhat.com> Date: Tue, 17 Jan 2023 13:35:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 1/2 version 2] fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp To: Carl Love , Ulrich Weigand , "will_schmidt@vnet.ibm.com" , gdb-patches@sourceware.org References: <53878e37c6e57de1d04d9c9960c5d0a74324ee6e.camel@us.ibm.com> <50474aa92ba82eff05cdc8f49001eae56be29670.camel@us.ibm.com> <89331c26795e3f7743e1e068dce43b3c2dd53008.camel@us.ibm.com> <071f24ecf9b3a2bbbe8fee7db77492eb55c5f3ff.camel@us.ibm.com> <1d9b21914354bef6a290ac30673741e722e11757.camel@de.ibm.com> <3e3c9c40f07ab01c79fe10915e76ffa187c42ad9.camel@us.ibm.com> <122f5d2d3db9ef1979b0f8da927d005f32bba82c.camel@us.ibm.com> <011768e8-2b76-f8ed-1174-fbaa020b15e7@redhat.com> From: Bruno Larsen In-Reply-To: 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=-6.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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 16/01/2023 17:37, Carl Love wrote: > GDB maintainers: > > Version 2: Addressed various comments from Bruno Larsen. > > This patch fixes the issues with the reverse-finish command on X86. > The reverse-finish command now correctly stops at the first instruction > in the source code line of the caller. It now only requires a single > reverse-step or reverse-next instruction to get back to the previous > source code line. > > It also adds a new testcase, gdb.reverse/finish-reverse-next.exp, and > updates several existing testcases. > > Version 2 patch changes have been re-verified on PowerPC and X86 with > no regressions. > > Please let me know if you have any comments on the patch. Thanks. > > Carl > > -------------------------------------------------------- > X86: reverse-finish fix > > PR record/29927 - reverse-finish requires two reverse next instructions to > reach previous source line > > Currently on X86, when executing the finish command in reverse, gdb does a > single step from the first instruction in the callee to get back to the > caller. GDB stops on the last instruction in the source code line where > the call was made. When stopped at the last instruction of the source code > line, a reverse next or step command will stop at the first instruction > of the same source code line thus requiring two step/next commands to > reach the previous source code line. It should only require one step/next > command to reach the previous source code line. > > By contrast, a reverse next or step command from the first line in a > function stops at the first instruction in the source code line where the > call was made. > > This patch fixes the reverse finish command so it will stop at the first > instruction of the source line where the function call was made. The > behavior on X86 for the reverse-finish command now matches doing a > reverse-next from the beginning of the function. > > The proceed_to_finish flag in struct thread_control_state is no longer > used. This patch removes the declaration, initialization and setting of > the flag. > > This patch requires a number of regression tests to be updated. Test > gdb.mi/mi-reverse.exp no longer needs to execute two steps to get to the > previous line. The gdb output for tests gdb.reverse/until-precsave.exp > and gdb.reverse/until-reverse.exp changed slightly. The expected result in > tests gdb.reverse/amd64-failcall-reverse.exp and > gdb.reverse/singlejmp-reverse.exp are updated to the correct expected > result. > > This patch adds a new test gdb.reverse/finish-reverse-next.exp to test the > reverse-finish command when returning from the entry point and from the > body of the function. > > The step_until proceedure in test gdb.reverse/step-indirect-call-thunk.exp > was moved to lib/gdb.exp and renamed cmd_until. > > The patch has been tested on X86 and PowerPC to verify no additional > regression failures occured. > > Bug:https://sourceware.org/bugzilla/show_bug.cgi?id=29927 > --- Changes look good now and I also dont see any regressions. Reviewed-By: Bruno Larsen -- Cheers, Bruno