From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81AFA3858D38; Wed, 25 Jan 2023 10:04:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81AFA3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674641073; bh=QKiGV76IeUwVkX3AD9Pt8V/7iUlZ+kw+maeISrni+GE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tyJ8vtrYP/YgBW+YPDagNmoyg2gGg7rvxbz7btqQuEAIb2IflTiGSsTtgcwW2sPmc O/BzXuPp03eNxXUfapWO+2tfRUg9g/rqZXXZA8JwZw/ooj8bkM3wUN3y8z2+9sG4HK rPeCjadeWpQI+IIXFURSIj01fm72QearIj9fytG4= From: "blarsen at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28426] Step reverse over line with multiple executable statements Date: Wed, 25 Jan 2023 10:04:32 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: blarsen at redhat dot com 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: cc 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=3D28426 B. Larsen changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blarsen at redhat dot com --- Comment #3 from B. Larsen --- As explained by Pedro Alves in this email thread (https://sourceware.org/pipermail/gdb-patches/2023-January/196110.html), it= is possible to reproduce this bug in x86_64, with a modified reproducer. Consi= der the following code: void func1 () { } void func 2 () { } int main () { int v =3D 0; func 1 (); func 2 (); return v; } and the debug session: (gdb) start Temporary breakpoint 1 at 0x40111c: file t.c, line 10. Starting program: /home/blarsen/Documents/downstream_build/gdb/reverse=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Temporary breakpoint 1, main () at t.c:10 10 int v =3D 0; (gdb) record (gdb) n 11 func1 (); func2 (); (gdb)=20 12 return v; (gdb) rn 11 func1 (); func2 (); (gdb)=20 11 func1 (); func2 (); (gdb) rn No more reverse-execution history. main () at t.c:10 10 int v =3D 0; (gdb)=20 Without a line before the `func1 (); func2 ()` GDB mistakenly reports that we've reached the end of the recorded history, but that is an unrelated bug. Compiling the example program with no column information, we get instead the following session: (gdb) start Temporary breakpoint 1 at 0x40111c: file t.c, line 10. Starting program: /home/blarsen/Documents/downstream_build/gdb/reverse=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Temporary breakpoint 1, main () at t.c:10 10 int v =3D 0; (gdb) record (gdb) n 11 func1 (); func2 (); (gdb)=20 12 return v; (gdb) rn 11 func1 (); func2 (); (gdb)=20 No more reverse-execution history. main () at t.c:10 10 int v =3D 0; (gdb) --=20 You are receiving this mail because: You are on the CC list for the bug.=