This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFA] Patch to fix "reverse-next" command error
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: "teawater" <teawater at gmail dot com>
- Cc: "Michael Snyder" <msnyder at vmware dot com>, "Pedro Alves" <pedro at codesourcery dot com>, <gdb-patches at sourceware dot org>
- Date: Wed, 11 Feb 2009 14:55:43 -0500
- Subject: RE: [RFA] Patch to fix "reverse-next" command error
- References: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BF2D@ecamlmw720.eamcs.ericsson.se> <6D19CA8D71C89C43A057926FE0D4ADAA06D3416B@ecamlmw720.eamcs.ericsson.se> <daef60380901292011y62875b4fv5aeda9e2359a7dd0@mail.gmail.com>
> From: teawater [mailto:teawater@gmail.com]
> Sent: Thursday, January 29, 2009 11:12 PM
> To: Marc Khouzam
> Cc: Michael Snyder; Pedro Alves; gdb-patches@sourceware.org
> Subject: Re: [RFA] Patch to fix "reverse-next" command error
>
> Hi Marc,
>
> Could you please send more message about your issue?
> >
> > I just noticed I still have the problem of jumping library functions
> > when using reverse-step. Seems ok for reverse-next.
> >
Was this still in my court? Sorry about that.
Here is how I reproduced the problem:
GNU gdb (GDB) 6.8.50.20090113-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 #include <stdio.h>
2 int main()
3 {
4 char* cptr = "Thread 1";
5 int b[2] = {5,8};
6 b[0] = 6; b[1] = 9;
7 printf("Thread 1, loop \n");
8 printf("Thread 2, loop \n");
9 printf("Thread 3, loop \n");
10 return 1;
(gdb) b main
Breakpoint 1 at 0x8048485: file a.cc, line 4.
(gdb) r
Starting program: /local/home/lmckhou/testing/a.out
Breakpoint 1, main () at a.cc:4
4 char* cptr = "Thread 1";
(gdb) record
(gdb) n
5 int b[2] = {5,8};
(gdb)
6 b[0] = 6; b[1] = 9;
(gdb)
7 printf("Thread 1, loop \n");
(gdb)
Thread 1, loop
8 printf("Thread 2, loop \n");
(gdb)
Thread 2, loop
9 printf("Thread 3, loop \n");
(gdb)
Thread 3, loop
10 return 1;
(gdb) rs
9 printf("Thread 3, loop \n");
(gdb)
8 printf("Thread 2, loop \n");
(gdb)
No more reverse-execution history. <===== What about lines 7, 6, 5?
main () at a.cc:4
4 char* cptr = "Thread 1";