* Wrong Reverse result
@ 2009-06-10 16:50 Marc Khouzam
2009-06-11 5:33 ` Hui Zhu
0 siblings, 1 reply; 8+ messages in thread
From: Marc Khouzam @ 2009-06-10 16:50 UTC (permalink / raw)
To: gdb
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?
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Wrong Reverse result 2009-06-10 16:50 Wrong Reverse result Marc Khouzam @ 2009-06-11 5:33 ` Hui Zhu 2009-06-11 8:28 ` Hui Zhu 2009-06-11 13:13 ` Marc Khouzam 0 siblings, 2 replies; 8+ messages in thread From: Hui Zhu @ 2009-06-11 5:33 UTC (permalink / raw) To: Marc Khouzam; +Cc: gdb, Michael Snyder I have reproduced this issue and find out the cause. infrun: TARGET_WAITKIND_STOPPED infrun: stop_pc = 0x8048361 infrun: stepped into subroutine infrun: inserting step-resume breakpoint at 0x8048349 stop_stepping is better. infrun: resume (step=0, signal=0), trap_expected=0 infrun: prepare_to_wait infrun: target_wait (-1, status) = infrun: 10798 [process 10798], infrun: status->kind = no-history infrun: infwait_normal_state No more reverse-execution history. infrun: stop_stepping main () at 1.c:7 On Thu, Jun 11, 2009 at 00:49, Marc Khouzam<marc.khouzam@ericsson.com> wrote: > 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). All of patches are not for prec, they are for reverse. > > 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 :-)) I am not sure Michael in GCC summit or not. If so, you can let he fix it at there directly. :) Thanks for your help. Hui > > 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? > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Wrong Reverse result 2009-06-11 5:33 ` Hui Zhu @ 2009-06-11 8:28 ` Hui Zhu 2009-06-11 13:13 ` Marc Khouzam 1 sibling, 0 replies; 8+ messages in thread From: Hui Zhu @ 2009-06-11 8:28 UTC (permalink / raw) To: Marc Khouzam; +Cc: gdb, Michael Snyder Post a patch for it. http://sourceware.org/ml/gdb-patches/2009-06/msg00291.html Hui On Thu, Jun 11, 2009 at 13:33, Hui Zhu<teawater@gmail.com> wrote: > I have reproduced this issue and find out the cause. > > infrun: TARGET_WAITKIND_STOPPED > infrun: stop_pc = 0x8048361 > infrun: stepped into subroutine > infrun: inserting step-resume breakpoint at 0x8048349 > > stop_stepping is better. > > infrun: resume (step=0, signal=0), trap_expected=0 > infrun: prepare_to_wait > infrun: target_wait (-1, status) = > infrun: 10798 [process 10798], > infrun: status->kind = no-history > infrun: infwait_normal_state > > No more reverse-execution history. > infrun: stop_stepping > main () at 1.c:7 > > On Thu, Jun 11, 2009 at 00:49, Marc Khouzam<marc.khouzam@ericsson.com> wrote: >> 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). > > All of patches are not for prec, they are for reverse. > >> >> 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 :-)) > > I am not sure Michael in GCC summit or not. If so, you can let he fix > it at there directly. :) > > Thanks for your help. > > Hui > >> >> 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? >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Wrong Reverse result 2009-06-11 5:33 ` Hui Zhu 2009-06-11 8:28 ` Hui Zhu @ 2009-06-11 13:13 ` Marc Khouzam 2009-06-11 13:45 ` Ramana Radhakrishnan 2009-06-11 14:00 ` Joel Brobecker 1 sibling, 2 replies; 8+ messages in thread From: Marc Khouzam @ 2009-06-11 13:13 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb, Michael Snyder > -----Original Message----- > From: Hui Zhu [mailto:teawater@gmail.com] > Sent: June-11-09 1:34 AM > To: Marc Khouzam > Cc: gdb@sourceware.org; Michael Snyder > Subject: Re: Wrong Reverse result > > I have reproduced this issue and find out the cause. Great. Thanks for doing that so quick. I forgot how to turn on those nice traces. Can you remind me? The traces don't mean much to me, but I can include them in any future (if any :-)) issues. > infrun: TARGET_WAITKIND_STOPPED > infrun: stop_pc = 0x8048361 > infrun: stepped into subroutine > infrun: inserting step-resume breakpoint at 0x8048349 > > stop_stepping is better. > > infrun: resume (step=0, signal=0), trap_expected=0 > infrun: prepare_to_wait > infrun: target_wait (-1, status) = > infrun: 10798 [process 10798], > infrun: status->kind = no-history > infrun: infwait_normal_state > > No more reverse-execution history. > infrun: stop_stepping > main () at 1.c:7 > > On Thu, Jun 11, 2009 at 00:49, Marc > Khouzam<marc.khouzam@ericsson.com> wrote: > > 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). > > All of patches are not for prec, they are for reverse. I realized that just after pressing 'send' :-) > > 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 :-)) > > I am not sure Michael in GCC summit or not. If so, you can let he fix > it at there directly. :) The summit is over now, but I did meet with Michael. It's nice to see people face to face. I was able to put a bit of pressure on him about reviewing the missing patches ;-). I'm sure that as soon as he has time, he'll have a look at these four things. Thanks Hui marc > > Thanks for your help. > > Hui > > > > > 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? > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Wrong Reverse result 2009-06-11 13:13 ` Marc Khouzam @ 2009-06-11 13:45 ` Ramana Radhakrishnan 2009-06-11 14:00 ` Joel Brobecker 1 sibling, 0 replies; 8+ messages in thread From: Ramana Radhakrishnan @ 2009-06-11 13:45 UTC (permalink / raw) To: Marc Khouzam; +Cc: Hui Zhu, gdb, Michael Snyder > Great. Thanks for doing that so quick. > I forgot how to turn on those nice traces. Can you > remind me? > The traces don't mean much to me, but I can include them > in any future (if any :-)) issues. help set debug on the gdb command line . cheers Ramana > >> infrun: TARGET_WAITKIND_STOPPED >> infrun: stop_pc = 0x8048361 >> infrun: stepped into subroutine >> infrun: inserting step-resume breakpoint at 0x8048349 >> >> stop_stepping is better. >> >> infrun: resume (step=0, signal=0), trap_expected=0 >> infrun: prepare_to_wait >> infrun: target_wait (-1, status) = >> infrun: 10798 [process 10798], >> infrun: status->kind = no-history >> infrun: infwait_normal_state >> >> No more reverse-execution history. >> infrun: stop_stepping >> main () at 1.c:7 >> >> On Thu, Jun 11, 2009 at 00:49, Marc >> Khouzam<marc.khouzam@ericsson.com> wrote: >> > 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). >> >> All of patches are not for prec, they are for reverse. > > I realized that just after pressing 'send' :-) > >> > 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 :-)) >> >> I am not sure Michael in GCC summit or not. If so, you can let he fix >> it at there directly. :) > > The summit is over now, but I did meet with Michael. It's nice to see > people face to face. I was able to put a bit of pressure on him > about reviewing the missing patches ;-). I'm sure that as soon as he > has time, he'll have a look at these four things. > > Thanks Hui > > marc > >> >> Thanks for your help. >> >> Hui >> >> > >> > 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? >> > >> > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Wrong Reverse result 2009-06-11 13:13 ` Marc Khouzam 2009-06-11 13:45 ` Ramana Radhakrishnan @ 2009-06-11 14:00 ` Joel Brobecker 2009-06-11 14:51 ` Marc Khouzam 2009-06-12 3:34 ` Hui Zhu 1 sibling, 2 replies; 8+ messages in thread From: Joel Brobecker @ 2009-06-11 14:00 UTC (permalink / raw) To: Marc Khouzam; +Cc: Hui Zhu, gdb, Michael Snyder > I forgot how to turn on those nice traces. Can you > remind me? > The traces don't mean much to me, but I can include them > in any future (if any :-)) issues. It's "set debug infrun 1". I don't know how I was ever able to investigate infrun issues before they got introduced... -- Joel ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Wrong Reverse result 2009-06-11 14:00 ` Joel Brobecker @ 2009-06-11 14:51 ` Marc Khouzam 2009-06-12 3:34 ` Hui Zhu 1 sibling, 0 replies; 8+ messages in thread From: Marc Khouzam @ 2009-06-11 14:51 UTC (permalink / raw) To: Joel Brobecker; +Cc: Hui Zhu, gdb, Michael Snyder > -----Original Message----- > From: Joel Brobecker [mailto:brobecker@adacore.com] > Sent: June-11-09 10:01 AM > To: Marc Khouzam > Cc: Hui Zhu; gdb@sourceware.org; Michael Snyder > Subject: Re: Wrong Reverse result > > > I forgot how to turn on those nice traces. Can you > > remind me? > > The traces don't mean much to me, but I can include them > > in any future (if any :-)) issues. > > It's "set debug infrun 1". I don't know how I was ever able to > investigate infrun issues before they got introduced... But now, you can use Eclipse, GDB and Reverse to debug those problems :-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Wrong Reverse result 2009-06-11 14:00 ` Joel Brobecker 2009-06-11 14:51 ` Marc Khouzam @ 2009-06-12 3:34 ` Hui Zhu 1 sibling, 0 replies; 8+ messages in thread From: Hui Zhu @ 2009-06-12 3:34 UTC (permalink / raw) To: Joel Brobecker; +Cc: Marc Khouzam, gdb, Michael Snyder On Thu, Jun 11, 2009 at 22:00, Joel Brobecker<brobecker@adacore.com> wrote: >> I forgot how to turn on those nice traces. Can you >> remind me? >> The traces don't mean much to me, but I can include them >> in any future (if any :-)) issues. > > It's "set debug infrun 1". I don't know how I was ever able to > investigate infrun issues before they got introduced... You can "set debug infrun 1". When you are interseting with some part for example "infrun: stepped into subroutine", you can search "infrun: stepped into subroutine" in infrun.c. You can find the code. Debug this part with Eclipse is more better than command mode. :) Thanks, Hui ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-06-12 3:34 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-06-10 16:50 Wrong Reverse result Marc Khouzam 2009-06-11 5:33 ` Hui Zhu 2009-06-11 8:28 ` Hui Zhu 2009-06-11 13:13 ` Marc Khouzam 2009-06-11 13:45 ` Ramana Radhakrishnan 2009-06-11 14:00 ` Joel Brobecker 2009-06-11 14:51 ` Marc Khouzam 2009-06-12 3:34 ` Hui Zhu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox