This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Will GDB extract the entire Variable history in further releases, based on Reverse Debugging?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Xing, Charlie" <Charlie dot Xing at Teradata dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 28 May 2012 17:28:08 +0200
- Subject: Re: Will GDB extract the entire Variable history in further releases, based on Reverse Debugging?
- References: <D466CE00251CE745AAE4B3677C6BFD520523D90F@SUSHDC8004.TD.TERADATA.COM>
On Mon, 28 May 2012 03:38:07 +0200, Xing, Charlie wrote:
> I've used the "Reverse Debugging" feature of GDB 7.4 and I'm curious if you
> guys would provide any advanced features based on it, E.g., Extracting the
> entire Variable History.
Also not sure what you mean like Pedro but I use IMO something like such
feature:
(gdb) l
1 /* 1 */ int var;
2 /* 2 */ int main (void) {
3 /* 3 */ int i; for (i=0;i<100;i++)
4 /* 4 */ var=i/10;
5 /* 5 */ return 0; }
(gdb) start
(gdb) record
(gdb) adv 5
main () at history.c:5
5 /* 5 */ return 0; }
(gdb) watch var
Hardware watchpoint 2: var
(gdb) reverse-continue
Continuing.
Hardware watchpoint 2: var
Old value = 9
New value = 8
0x00000000004004c3 in main () at history.c:4
4 /* 4 */ var=i/10;
(gdb) p i
$1 = 90
(gdb) reverse-continue
Continuing.
Hardware watchpoint 2: var
Old value = 8
New value = 7
0x00000000004004c3 in main () at history.c:4
4 /* 4 */ var=i/10;
(gdb) p i
$2 = 80
Regards,
Jan