From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 75852385DC09; Fri, 21 Oct 2022 10:49:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75852385DC09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666349388; bh=x7cpl/c4BJTRnVgdd03kO6RFgW3CETukr618V1lXEqc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QMkTgcKD2gzTA0W9TvzvEWKOMzI4Npqrj+NAjmzEN+Ezl88hbrWwgox0b/2kFXADd HltyFD3VR81cNrEqEaWTCDZAdMAcbGsFejz1asHL4zZz0wcKlaHi2qLtoRbzq8LAZL sCtO3gHfMrjQguKQiEpvo1hCVc5t5WSNF7Jr8dns= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/16678] record problem with recursion Date: Fri, 21 Oct 2022 10:49:48 +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: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D16678 --- Comment #2 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Bruno Larsen : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1f3e37e057e8= 76b37db49dbd8ed5ca22c33f6772 commit 1f3e37e057e876b37db49dbd8ed5ca22c33f6772 Author: Bruno Larsen Date: Wed May 25 15:02:47 2022 -0300 gdb/reverse: Fix stepping over recursive functions Currently, when using GDB to do reverse debugging, if we try to use the command "reverse next" to skip a recursive function, instead of skipping all of the recursive calls and stopping in the previous line, we stop at the second to last recursive call, and need to manually step backwards until we leave the first call. This is well documented in PR gdb/16678. This bug happens because when GDB notices that a reverse step has entered into a function, GDB will add a step_resume_breakpoint at the start of the function, then single step out of the prologue once that breakpoint is hit. The problem was happening because GDB wouldn't give that step_resume_breakpoint a frame-id, so the first time the breakpoint was hit, the inferior would be stopped. This is fixed by giving the current frame-id to the breakpoint. This commit also changes gdb.reverse/step-reverse.c to contain a recursive function and attempt to both, skip it altogether, and to skip the second call from inside the first call, as this setup broke a previous version of the patch. --=20 You are receiving this mail because: You are on the CC list for the bug.=