Temporal meta-programming: treating time as a spatial dimension

Gene D. Cooperman, Ana-Maria Visan · 2012

Reversible debuggers have existed since the early 1970s. However, they are not widely used, with the possible exception of GDB. GDB's target record is useful only when the cause of the bug is close in time to the bug manifestation. When the cause of the bug is far away from the manifestation, one resorts to a series of debugging sessions with the goal of narrowing down the cause of the bug. Thanks to reverse execution, it is possible to jump back and forth to any time of the execution. In this dissertation, we present a new reversible debugging platform, based on checkpoint, restart, re-execute and decomposition of histories of debugging commands. Our platform can reversibly debug real-world multithreaded programs, such as MySQL, on multi-core architectures. We present a novel tool implemented on top of this reversible debugging platform, called reverse expression watchpoint. Reverse expression watchpoint helps the user diagnose bugs, for which the cause of the bug is far away from the manifestation. Once the user identifies a failed invariant, she wishes to automatically locate a program statement inside a debugger, such as GDB, where the invariant holds, but it will fail at the next immediate statement. This approach is different than GDB's software watchpoints. Reverse expression watchpoint performs large jumps in time, thanks to this new approach, and it takes advantage of multi-core architectures during replay, for multithreaded applications.

Read the paper · More papers on PaperTik