Created attachment 6625 [details] testcase.c formerly: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54405 gdb ./a.out -ex start -ex record -ex next -ex next -ex 'set debug infrun 1' -ex reverse-next FAIL: No more reverse-execution history. main () at 12.c:18 18 v = 1; PASS: 19 f (); You should compile it with gcc < 4.7 (such as FSF GCC 4.6) to avoid another bug.
Created attachment 6626 [details] non-regression-tested GDB fix
Created attachment 6627 [details] Unrelated fix (for myself) for gcc >= 4.7
Comment on attachment 6627 [details] Unrelated fix (for myself) for gcc >= 4.7 Included instead in: [patch+7.5?] Fix GDB-return into TAILCALL_FRAME (PR 14119) http://sourceware.org/ml/gdb-patches/2012-09/msg00218.html
CVSROOT: /cvs/src Module name: src Changes by: jkratoch@sourceware.org 2012-09-17 07:09:35 Modified files: gdb : ChangeLog infrun.c gdb/testsuite : ChangeLog Added files: gdb/testsuite/gdb.reverse: singlejmp-reverse-nodebug.S singlejmp-reverse-nodebug.c singlejmp-reverse.S singlejmp-reverse.c singlejmp-reverse.exp Log message: gdb/ PR 14548 * infrun.c (handle_inferior_event): Do not reverse-continue back to the function start if we are already at function start. Both for reverse-next and for reverse-step into function without line number info. gdb/testsuite/ PR 14548 * gdb.reverse/singlejmp-reverse-nodebug.S: New file. * gdb.reverse/singlejmp-reverse-nodebug.c: New file. * gdb.reverse/singlejmp-reverse.S: New file. * gdb.reverse/singlejmp-reverse.c: New file. * gdb.reverse/singlejmp-reverse.exp: New file. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14662&r2=1.14663 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&r1=1.557&r2=1.558 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3374&r2=1.3375 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.S.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.c.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp.diff?cvsroot=src&r1=NONE&r2=1.1
CVSROOT: /cvs/src Module name: src Branch: gdb_7_5-branch Changes by: jkratoch@sourceware.org 2012-09-17 07:14:56 Modified files: gdb : ChangeLog infrun.c gdb/testsuite : ChangeLog Added files: gdb/testsuite/gdb.reverse: singlejmp-reverse-nodebug.S singlejmp-reverse-nodebug.c singlejmp-reverse.S singlejmp-reverse.c singlejmp-reverse.exp Log message: gdb/ PR 14548 * infrun.c (handle_inferior_event): Do not reverse-continue back to the function start if we are already at function start. Both for reverse-next and for reverse-step into function without line number info. gdb/testsuite/ PR 14548 * gdb.reverse/singlejmp-reverse-nodebug.S: New file. * gdb.reverse/singlejmp-reverse-nodebug.c: New file. * gdb.reverse/singlejmp-reverse.S: New file. * gdb.reverse/singlejmp-reverse.c: New file. * gdb.reverse/singlejmp-reverse.exp: New file. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=1.14469.2.31&r2=1.14469.2.32 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=1.549&r2=1.549.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=1.3295.2.21&r2=1.3295.2.22 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.S.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse-nodebug.c.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.S.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.c.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.reverse/singlejmp-reverse.exp.diff?cvsroot=src&only_with_tag=gdb_7_5-branch&r1=NONE&r2=1.1.2.1
Checked in for 7.5.1.