From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lK06N0OWxmMFqhgAWB0awg (envelope-from ) for ; Tue, 17 Jan 2023 07:36:19 -0500 Received: by simark.ca (Postfix, from userid 112) id D16C11E128; Tue, 17 Jan 2023 07:36:19 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LrDA0x3f; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 3B9F41E110 for ; Tue, 17 Jan 2023 07:36:19 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4295F385841D for ; Tue, 17 Jan 2023 12:36:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4295F385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673958978; bh=ZO125XLwX54MbFjsJPAKEEASq8IhT8DSGAr1NXyNiTQ=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=LrDA0x3fVH5ZN8wrdrDZJjUdyYguJCAR3SW5cMSpzxyOb9Ce1PoRCCRdj88DZ4mDM jJ3GACRDIzYgIaK31BPM/vZitYRKatYN5W6sH3+vT8tdSO34EnlhaWumSDAKiayAg5 dH25E1mBB3o2NMv2xql8t/YjXJ6XOEj7UZaPR1Nc= 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 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> 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-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: , From: Bruno Larsen via Gdb-patches Reply-To: Bruno Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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