cargo-rr
A light wrapper around rr, the time-travelling debugger.
Do you find yourself running the same test over and over in the debugger, trying to figure out how the code got in a bad state? We have a tool for you! Easy to install and setup, it will record an execution trace, and that gives magical new powers to gdb. Step backwards, run backwards, see where variables changed their value or when a function was last called on an object (using conditional breakpoints). (source)
Suppose we ran a test and got a failure. We first re-run the test under rr to
record the entire execution (including everything else on your system the test
interacts with).
> cargo
; ; ; ; ;
Let's replay the recording.
> cargo
()
; ; ; ; ;
We'll go backwards until we return to the failed assertion so we can have a look at a and b.
()
()
)
;
()
()
I wonder where a is set to 1?
()
()
)
);
Note that since we're going in reverse the old and new values are backwards.
-1992923200 is whatever used to be at the address 0x000055dcac485ed9
before it was used for a.