Summary
Undo Software has released version 1.5 of their bidirectional debugger, which enables you to step backwards through the code, showing you exactly what happened to cause a bug. It works on unmodified binary programs.
Advertisement
Greg Law, co-founder of Undo Software, explained it this way:
Debugging is about thinking backwards to deduce what happened. . . . A bidirectional debugger allows programmers to run a program backwards in time as well as forwards. The program can be stepped back line-by-line, or rewound to any point in its history. Furthermore, programmers can play the program forwards and backwards in a totally repeatable fashion, allowing them to "home in" on the cause of a bug.
Version 1.5 plugs into GDB on X86 Linux, and works on unmodified binary programs, such as compiled C or C++ programs. (Like a typical debugger, to get source-level debugging the binary must be a debug build.) The current version supports only single-threaded debugging, but multi-threaded debugging is coming soon in version 2, said Law.
Law put this approach to debugging into context by quoting Kernighan and Pike:
Bidirectional debugging is so useful because it gives the user control over time. To debug a program is to reason backwards from the point of failure to determine its cause. On the first page of their book, The Practice of Programming, Brian Kernighan and Rob Pike give the following advice to programmers when debugging:
Reason back from the state of the crashed program to determine what could have caused this. Debugging involves backwards reasoning, like solving murder mysteries. Something impossible occurred, and the only solid information is that it really did occur. So we must think backwards from the result to discover the reasons.
With this analogy, a programmer using a bidirectional debugger is like the detective finding detailed CCTV footage not just of the murder itself, but also all pertinent events that led to the murder.
Bidirectional debugging has been available to Java programmers with tools such as Visicomp's Retrovue, and UndoDB brings this capability to C and C++ programmers. This technique may be even more useful to C and C++ programmers, suggested Law, because "some of the bugs can be harder to find in C++ programs."
> Quote: "...plugs into GDB". How did they get around the > GPL license? How does it actually plug into GDB?
Maybe they didn't get around. It's free for non-commercial use. The open source community could be so happy about the existence of such a tool that if someone claimed it couldn't be used because of GPL, then this someone would certainly be killed. :)
> > Maybe they didn't get around. It's free for non-commercial > use. > Oh, I've browsed through the license agreement. So many restrictions that I think it can't be GPL-compatible in any way :)
I thought so. What I meant was that open source community will benefit so much from this tool that it would be insane to bother the developers with license issues. The point of GPL is to protect free software. If UndoDB can help free software, and it surely can, we should let it grow. People can't be purists (about GPL) all the time.
> I thought so. What I meant was that open source community > will benefit so much from this tool that it would be > insane to bother the developers with license issues. The > point of GPL is to protect free software. If UndoDB can > help free software, and it surely can, we should let it > grow. People can't be purists (about GPL) all the time.
This is not a question of "we", whoever that includes. The FSF is holding the copyrights for GDB (which was originally written by RMS), and if they feel Undo Software does not comply with their licensing terms (i.e. the GPL), they can sue for copyright infringement. Yes, those people are purists. That's why they have written a complete development chain from scratch. If you do not share their ideas about freedom, do not distribute their software. Undo could write their own debugging engine, or buy one from some other vendor, e.g. etnus.
Also: this is not as revolutionary as it looks. Lizard, a GPL-licensed implementation of this idea, has been available since at least 2004.
Sorry about my ignorance, and thanks about the pointer to Lizard. And about FSF people sharing their ideas about freedom, GPL doesn't require me to share those ideas in order to use GPL software, so I will continue to use and distribute free software for as long as it is useful to me. Now, please, let's not start another religious war.
> Sorry about my ignorance, and thanks about the pointer to > Lizard.
Seems like people are working on this also for standard gdb.
> And about FSF people sharing their ideas about freedom, > GPL doesn't require me to share those ideas in order to > use GPL software, so I will continue to use and distribute > free software for as long as it is useful to me.
Using and distributing is very different with regard to the GPL: there are no restrictions whatsover for using the softeware, but for distribution , the license terms must be followed.
> Now, please, let's not start another religious war.
No danger :-) I just wanted to point out that there is a big difference between bashing people for choosing a license for stuff they actually wrote more or less from scratch, and speaking up against adding some features and selling the whole thing without consent from the original authors. Also, I am not implying that Undo did this, that's for the copyright holders to decide.