From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C33D385D0DF; Wed, 26 Oct 2022 14:00:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C33D385D0DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666792843; bh=aOVPVfcjsT4RcjdlNeZt5ej4SYVjsixko2dJ5uJDCuM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bb1G/7dWptpl0R1szk/LUfefiOxGDiOUuTt0N/G4HF5+gHRdlc2woShkYfPR+9NWr sPjiJq6PlstX+SWCkbjzibpXZWb/XPawxqrbfWZSEMw7wYsIqw6nJwRpfcTpKi7e8N WiYfBLsPnRHykCuRai29o9u/RCxE7ZEFIWYk4i3A= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/28426] Step reverse over line with multiple executable statements Date: Wed, 26 Oct 2022 14:00:26 +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: vries 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: cc attachments.created 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 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #1 from Tom de Vries --- Created attachment 14415 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14415&action=3Ded= it reproduce.sh I've written a reproducer script reproducer.sh (generating test.c and gdb.i= n) based on comment #0. I first tried with gcc 7.5.0, but that one does not emit column info by default, so I added -gcolumn-info: ... $ gcc -g test.c ; readelf -wl a.out | grep -i column $ $ gcc -g test.c -gcolumn-info ; readelf -wl a.out | grep -i column [0x0000010f] Set column to 1 [0x0000011d] Set column to 7 [0x00000120] Set column to 8 [0x00000125] Set column to 20 [0x00000128] Set column to 8 [0x0000012c] Set column to 10 [0x0000012f] Set column to 1 ... Then, I used "b *main" to start at line 2 (otherwise, on x86_64-linux, it starts at line 3). Still, it doesn't reproduce for me with current trunk and x86_64-linux: ... $ ./reproduce.sh ... +b *main Breakpoint 1 at 0x400497: file test.c, line 2. +run Breakpoint 1, main () at test.c:2 2 { +record +target record-full +step 3 int b[2] =3D {5,8}; +step 5 b[0] =3D 1; +step 6 b[1] =3D 2; +step 8 b[0] =3D 6; b[1] =3D 9; /* generic statement, end part = two */ +step 10 b[1] =3D 10; +step 11 b[0] =3D 20; +step 13 return 0; +set exec-dir reverse +step 11 b[0] =3D 20; +step 10 b[1] =3D 10; +step 8 b[0] =3D 6; b[1] =3D 9; /* generic statement, end part = two */ +step 6 b[1] =3D 2; +step 5 b[0] =3D 1; +step 3 int b[2] =3D {5,8}; +step No more reverse-execution history. main () at test.c:2 2 { ... in other words, after 7 steps forward and 7 steps back I end up at the same point where I started: line 2. That's both with gcc 7.5.0 and gcc 12.2.1. --=20 You are receiving this mail because: You are on the CC list for the bug.=