This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Wrong Reverse result
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: <gdb at sourceware dot org>
- Date: Wed, 10 Jun 2009 12:49:56 -0400
- Subject: Wrong Reverse result
Hi,
I'm getting a weird behaviour in reverse, where GDB
jumps to far backwards.
I have GDB HEAD from two weeks ago with the three
missing PRrecord patches applied (that were pinged
by Hui this very week).
I'm running on Ubuntu.
Is it me or can someone reproduce it?
(It happened during my presentation at the GCC summit,
so I have witnesses :-))
Thanks
Marc
GNU gdb (GDB) 6.8.50.20090522-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) l
1 void foo() {
2 return;
3 }
4
5 int main() {
6
7 foo(); // 1
8 foo(); // 2
9 foo(); // 3
10
(gdb) l
11 return 0;
12 }
(gdb) start
Temporary breakpoint 1 at 0x80483f7: file r.c, line 7.
Starting program: /home/marc/testing/a.out
Temporary breakpoint 1, main () at r.c:7
7 foo(); // 1
Current language: auto; currently c++
(gdb) record
(gdb) n
8 foo(); // 2
(gdb) n
9 foo(); // 3
(gdb) n
11 return 0;
(gdb) rn
9 foo(); // 3
(gdb) s
foo () at r.c:3
3 }
(gdb) rn
No more reverse-execution history.
main () at r.c:7
7 foo(); // 1
======== This is weird. Why does it go back to the top?