Reverse Debugging with GDB back
Board: Board index ‹ Ray tracing ‹ Considered harmful
(L) [2008/12/31] [bouliiii] [Reverse Debugging with GDB] Wayback!Hello guys,
something huge that may make debugging sessions much much more powerful and easier. Not sure however that this is able to record huge pieces of executed code.
[LINK http://sourceware.org/ml/gdb-patches/2008-06/msg00041.html]
I downloaded the patch and compiled gdb with it. And it just works.
Ben
EDIT: This is huge. By disabling hardware support for watchpoint  while replaying code, you are able to have reverse watchpoint which is basically a bug killer
Code: [LINK # Select all]Watchpoint 18: *(int *) 146604548
Old value = 822890675
New value = 1396005216 main () at radix.cpp:77
(rec) c Continuing. Breakpoint 15, main () at radix.cpp:81
(rec) rev record: GDB is set to reverse debug mode.
(rev) c Continuing.
Watchpoint 18: *(int *) 146604548
Old value = 1396005216
New value = 822890675 0x0804868f in main () at radix.cpp:78
(rev) c Continuing. Breakpoint 17, main () at radix.cpp:77
(L) [2008/12/31] [tarlack] [Reverse Debugging with GDB] Wayback!youhou, together with valgrind and what gdb already did, bugs will have more and more difficulties to get annoying  [SMILEY :mrgreen:]
The main problem is multithreaded programs debugging...basically, I have no tools for that, do you (all ompf contributers, not just bouli^4) have one ?
and maybe someone will know that : is it possible in gdb to interrupt the execution of a thread while maintaining the execution of another ? because this is really pain in the ass ( (c)tbp) when debugging multithreaded computations that don't stop switching from one thread to another as they are reaching breakpoints...
(L) [2008/12/31] [bouliiii] [Reverse Debugging with GDB] Wayback!>> tarlack wrote: and maybe someone will know that : is it possible in gdb to interrupt the execution of a thread while maintaining the execution of another ?
This is the non-stop mode of GDB
[LINK http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#SEC45]
(L) [2008/12/31] [tarlack] [Reverse Debugging with GDB] Wayback!thanks, my desktop thanks you for all the violence it won't have to bear anymore and the persons who I work with thank you for the decrease of bad mouthing they will have to bear as well [SMILEY :D]
(L) [2009/01/22] [mmp] [Reverse Debugging with GDB] Wayback!>> tarlack wrote:The main problem is multithreaded programs debugging...basically, I have no tools for that, do you (all ompf contributers, not just bouli^4) have one ?
I've had delightful results doing multithreaded debugging helgrind, part of the valgrind tool set ([LINK http://valgrind.org/docs/manual/hg-manual.html]).
There are some commercial tools that do similar things (intel thread checker), but I am somewhat embarassed to admit that I haven't used any of those directly.
-matt
(L) [2009/01/22] [dr_eck] [Reverse Debugging with GDB] Wayback!For those using MSVS, the Intel Parallel Studio beta is free and has a bunch of tools for dealing with threaded programs.  Unfortunately, it doesn't like AMD processors.
back