4 ms·
What I like most: you can debug data flow! To see where a value came from, set a memory-breakpoint and reverse-continue. This is not just useful when you suspe
by ynik 5y ago
What I like most: you can debug data flow!
To see where a value came from, set a memory-breakpoint and reverse-continue. This is not just useful when you suspect memory corruption (your point 2).
I use it more often with a large legacy C code base. It outputs a complex data structure. There's often several code paths computing values for a particular field. For someone unfamiliar with the code base, it can be tricky to tell which code path was responsible for computing the value in a particular instance of the struct (where I see incorrect output).
By reverse debugging with memory breakpoints, I can trace the data flow backwards until I find where the computation went wrong.
Note: Since I'm developing on Windows, I'm not using rr for that; but Microsoft's Time-Travel Debugger (WinDbg Preview).