2 ms·
I would strongly suggest you check out rr - Mozilla's Record and Replay framework https://github.com/mozilla/rr https://github.com/mozilla/rr . Don't let the na
by Asooka 10y ago
I would strongly suggest you check out rr - Mozilla's Record and Replay framework https://github.com/mozilla/rr https://github.com/mozilla/rr . Don't let the name confuse you - it's not specific at all to Firefox. It can record a process's execution and replay it in gdb, and lets you step and continue backwards. This last point is super powerful - let's say you see that some variable has an unexpected value. You can set a watchpoint on it, then reverse-continue and gdb will stop at the point it was changed. It has been invaluable in finding some tricky bugs. Apart from that, you can also use it to explore the execution of a program, since you can freely step backwards and forwards in time. You also get a deterministic thread execution sequence each time. That might be either good or bad, depending on what you want.