From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B94C93858C2B; Tue, 17 Jan 2023 16:47:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B94C93858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673974072; bh=8xjrbqQ8kzwjvm8p0OI8K17kuH9/Xh1uaYa+7BdPpIY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=laKLsEyTouXdbGJs6MSWqCKBd2Q1qrW3Hy5NVYYO5LIJO61+xSbd+yjFa7XhK7Nhy thnlIOO/SGL+KcPFrOwtEAZjxrin4ZFqksX2vQNxSiVtLY1z3NFr20VSHyem2wkhwm b/SIBD05ViHBEiwdtvcNVbjLlldKQGSLA+DY83F0= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/29927] reverse-finish requires two reverse next instructions to reach previous source line Date: Tue, 17 Jan 2023 16:47:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29927 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Carl Love : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db22548ddb30b= fb167708e82d3bb932461c1b703a commit b22548ddb30bfb167708e82d3bb932461c1b703a Author: Carl Love Date: Mon Dec 19 12:48:54 2022 -0500 X86: reverse-finish fix PR record/29927 - reverse-finish requires two reverse next instruction= s to reach previous source line Currently on X86, when executing the finish command in reverse, gdb doe= s 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/n= ext 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 t= he 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 resul= t 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=3D29927 --=20 You are receiving this mail because: You are on the CC list for the bug.=