Will GDB extract the entire Variable history in further releases, based on Reverse Debugging?

Jan Kratochvil jan.kratochvil@redhat.com
Mon May 28 15:28:00 GMT 2012


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



More information about the Gdb mailing list