Make GDB can record a log of the process execution, and replay it with both forward and reverse execute commands. It's in GDB main trunk now. To get more message: http://sourceware.org/gdb/wiki/ReversibleDebugging


http://sourceware.org/gdb/wiki/ReversibleDebugging





Separate each tag with a space.

Release Date:

2008-06-05

Topics:

License:

Ratings and Reviews

Be the first to post a text review of GDB record patch. Rate and review a project by clicking thumbs up or thumbs down in the right column.

Project Feed

  • Project Information Updated

    teawater changed the public information on the GDB record patch project

    posted by teawater 125 days ago

  • Project Information Updated

    teawater changed the public information on the GDB record patch project

    posted by teawater 125 days ago

  • record record-0.1.5 file released: gdb-6.8-record-0.1.5.tar.bz2

    posted 521 days ago

  • record record-0.1.5 file released: gdb-6.8-record-0.1.5.patch

    posted 521 days ago

  • record record-0.1.5 file released: gdb-6.8-record-0.1.5.diffwith.0.1.4.patch

    posted 521 days ago

  • GDB record patch 0.1.5 for GDB-6.8 release

    GDB record patch make GDB support Reversible Debugging. It make GDB disassemble the instruction that will be executed to get which memory and register will be changed and record them to record all program running message. Through these on the use of this information to achieve the implementation of the GDB Reversible Debugging function. To get more message, you can go to http://sourceforge.net/projects/record/ . The main change of the 0.1.5 is can record the memory or registers change in command line. And if the inferior in backward part and user want change the values of the memory or registers, GDB will ask user if he want destory next record and record this change or not. Of course, not everybody like answer the questions each times. Maybe I need add a set command in next version. This cool idea is from GDB-patches maillist.Thank you.:) Another change is add a command "delrecord (drec)". When the inferior in backward part and user call this command, GDB will destorey next recorded message and continue record message. I think this command name is not very clear. Maybe you can help me a new one. Thanks. :) Example: cat 1.c int a = 0; void cool2 () { printf ("a = %d\n", a); } int cool () { a += 3; cool2(); return (a); } int main() { int b = 0; int c = 1; printf ("a = %d b = %d c = %d\n", a, b, c); b = cool (); printf ("a = %d b = %d c = %d\n", a, b, c); c += 1; printf ("a = %d b = %d c = %d\n", a, b, c); a -= 2; printf ("a = %d b = %d c = %d\n", a, b, c); return (0); } gcc -g 1.c gdb ./a.out GNU gdb 6.8 Copyright (C) 2008 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"... Setting up the environment for debugging gdb. Function "internal_error" not defined. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] Function "info_command" not defined. Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] /media/disk/bgdb68/gdb/.gdbinit:8: Error in sourced command file: No breakpoint number 0. (gdb) b main Breakpoint 1 at 0x80483c1: file ../../1.c, line 19. (gdb) r Starting program: /media/disk/bgdb68/gdb/a.out Breakpoint 1, main () at ../../1.c:19 19 int b = 0; (gdb) rec record: record and reverse function is started. (rec) n During symbol reading, incomplete CFI data; unspecified registers (e.g., eax) at 0x80483be. 20 int c = 1; (rec) 22 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) During symbol reading, incomplete CFI data; DW_CFA_restore unspecified register ebp (#5) at 0xffffe411. a = 0 b = 0 c = 1 23 b = cool (); (rec) a = 3 24 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) a = 3 b = 3 c = 1 26 c += 1; (rec) rev record: GDB is set to reverse debug mode. (rev) n 0x0804841a 24 printf ("a = %d b = %d c = %d\n", a, b, c); (rev) 0x080483f8 23 b = cool (); (rev) 0x080483ee 22 printf ("a = %d b = %d c = %d\n", a, b, c); (rev) drec Delete the next running messages and begin to record the running message at current address?(y or n) y (rev) rev record: GDB is set to normal debug mode. (rec) n a = 0 b = 0 c = 1 23 b = cool (); (rec) a = 3 24 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) a = 3 b = 3 c = 1 26 c += 1; (rec) p a=9999999999 $1 = 1410065407 (rec) p a $2 = 1410065407 (rec) n 27 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) n a = 1410065407 b = 3 c = 2 28 a -= 2; (rec) rev record: GDB is set to reverse debug mode. (rev) n 0x08048442 27 printf ("a = %d b = %d c = %d\n", a, b, c); (rev) 26 c += 1; (rev) 0x0804841a 24 printf ("a = %d b = %d c = %d\n", a, b, c); (rev) p a $3 = 3 (rev) n 0x080483f8 23 b = cool (); (rev) 0x080483ee 22 printf ("a = %d b = %d c = %d\n", a, b, c); (rev) 20 int c = 1; (rev) p a=123 Becuse GDB is not at the end of record list, it will destory the record in the next if write memory that addr is 0x8049680 and size is 4. Do you want GDB do it?(y or [n]) y $4 = 123 (rev) rev record: GDB is set to normal debug mode. (rec) n 22 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) a = 123 b = 0 c = 1 23 b = cool (); (rec) n a = 126 24 printf ("a = %d b = %d c = %d\n", a, b, c); (rec) n a = 126 b = 126 c = 1 26 c += 1; (rec) c Continuing. a = 126 b = 126 c = 2 a = 124 b = 126 c = 2 The next instruction is syscall exit_group. It will make the program exit. Do you want to pause the program.([y] or n) y record: record pause the program. (rec) quit The program is running. Exit anyway? (y or n) y record: record and reverse function is stopped.

    posted by teawater 521 days ago

  • File released: /record/record-0.1.5/gdb-6.8-record-0.1.5.tar.bz2

    posted 521 days ago

  • File released: /record/record-0.1.5/gdb-6.8-record-0.1.5.patch

    posted 521 days ago

  • File released: /record/record-0.1.5/gdb-6.8-record-0.1.5.diffwith.0.1.4.patch

    posted 521 days ago

  • record record-0.1.4 file released: gdb-6.8-record-0.1.4.tar.bz2

    The main change of the 0.1.4 is add a new functon "my_waitpid_record" in file "linux-nat.c". When the record function is enable and the parameter "step" of function "resume" is 0, the function "linux_nat_wait" will call "my_waitpid_record" instead of "my_waitpid". The "my_waitpid_record" will record the running message, resume and wait inferior with itself. It will make GDB that record function is enable speed up. My test result is the speed enhanced 3 times at least. And I fixed some bugs that Thiago Jung Bauermann mail to me. Thanks for his help. :) I will add the features such as read only mode that we talk in maillist in next version.

    posted 533 days ago

Rate and Review

Be the first person to add a text review.

Would you recommend this project?






<

Related Projects

GDB record patch Actions

Thanks for your rating!

Would you also like to write a review?





Skip Review