From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E25BF3858434; Tue, 17 Jan 2023 16:47:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E25BF3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673974077; bh=HQWGTQUds+ssYsxui+3BUWLGnufcheEL8Z6mMesoRVQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t670Ix8bsYiQDub5X2QqZSl3QBsIJ41ZMW/ZY02aNqrqpQfjMxJVYGJ8VuP6okdrH 0V0Hg/r1EQnSL4CxfkPATNy+On38VMNxCrEnyHgH2eoOR3p5wc3KjIRTTkGbCsajch cKZCwF1b34sxkupMIdXiNbaMM+rMqAw7EwxWzAHo= 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:57 +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 #4 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=3D92e07580db6a= 5572573d5177ca23933064158f89 commit 92e07580db6a5572573d5177ca23933064158f89 Author: Carl Love Date: Fri Jan 13 17:59:33 2023 -0500 PowerPC: fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp PR record/29927 - reverse-finish requires two reverse next instructions= to reach previous source line PowerPC uses two entry points called the local entry point (LEP) and the global entry point (GEP). Normally the LEP is used when calling a function. However, if the table of contents (TOC) value in register 2 = is not valid the GEP is called to setup the TOC before execution continues= at the LEP. When executing in reverse, the function finish_backward sets = the break point at the alternate entry point (GEP). However if the forward execution enters via the normal entry point (LEP), the reverse execution never sees the break point at the GEP of the function. Reverse executi= on continues until the next break point is encountered or the end of the recorded log is reached causing gdb to stop at the wrong place. This patch adds a new address to struct execution_control_state to hold= the address of the alternate function start address, known as the GEP on PowerPC. The finish_backwards function is updated. If the stopping po= int is between the two entry points (the LEP and GEP on PowerPC), the stepp= ing range is set to execute back to the alternate entry point (GEP on Power= PC). Otherwise, a breakpoint is inserted at the normal entry point (LEP on PowerPC). Function process_event_stop_test checks uses a stepping range to stop execution in the caller at the first instruction of the source code lin= e. Note, on systems that only support one entry point, the address of the = two entry points are the same. Test finish-reverse-next.exp is updated to include tests for the reverse-finish command when the function is entered via the normal entry point (i.e. the LEP) and the alternate entry point (i.e. the GEP). The patch has been tested on X86 and PowerPC with no regressions. --=20 You are receiving this mail because: You are on the CC list for the bug.=