Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The best thing about time travel debugging is that you effectively get an instruction-perfect reproducer for the problem you're looking at.

Even if the problem only occurs one time in a thousand, if you have recorded it then you can review it in arbitrary detail as many times as you need. You can even send the recording to another developer for their feedback.

Probably the second best thing about time travel is watchpoints[0] + reverse-continue[1] - combining these two features, you can answer "why is that value there?" incredibly quickly.

Reverse execution + watchpoints is so powerful it can speed up the diagnosis of memory corruptions, race conditions, algorithmic bugs, etc from days/weeks to hours.

[0] https://sourceware.org/gdb/onlinedocs/gdb/Set-Watchpoints.ht...

[1] https://sourceware.org/gdb/onlinedocs/gdb/Reverse-Execution.... - GDB has an implementation of reverse debugging but larger projects like `rr` (https://rr-project.org/) or `udb` (https://undo.io/solutions/products/udb/ - which, disclaimer, I work on) exist to do this with higher performance on complex, real-world programs.

(edit: format links better)



Time travel debugging https://en.wikipedia.org/wiki/Time_travel_debugging :

> Interactive debuggers include the ability to modify code and step forward based on updated information.[4] Reverse debugging tools allow users to step backwards in time through the steps that resulted in reaching a particular point in the program. Time traveling debuggers provide these features and also allow users to interact with the program, changing the history if desired, and watch how the program responds.[5]

https://github.com/rr-debugger/rr :

> System requirements: Linux kernel ≥ 3.11 is required (for PTRACE_SETSIGMASK).

> rr currently requires either:

> An Intel CPU with Nehalem (2010) or later microarchitecture. [OR] Certain AMD Zen or later processors

Is there an rr-like reverse time-travel debugging tool for ARM64/aarch64?

Are GUIs like Voltron and Ghidra helpful for gdb and/or rr-like traces?


> Is there an rr-like reverse time-travel debugging tool for ARM64/aarch64?

Aside from `khuey`'s comment (https://news.ycombinator.com/item?id=30779913) that `rr` can now work on ARM64, we at Undo (https://undo.io) have an ARM64 port under routine internal testing as we expect it to be important in the future.

GDB's built-in record/replay is also supposed to work on ARM64 - https://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and...

Last I heard, on x86, the performance and memory overheads of that implementation were quite high but if it solves your problem maybe that's fine!


rr works in principle on AArch64 though it requires an extremely recent CPU and the rest of system userspace to be compiled correctly.

Any gdb front end can probably be made to work with rr. Our current project is (shameless plug) https://pernos.co/ which provides a super-advanced GUI for working with (x86) rr traces.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: