|
|
Subscribe / Log in / New account

Instant replay: Debugging C and C++ programs with rr (Red Hat Developer)

Instant replay: Debugging C and C++ programs with rr (Red Hat Developer)

Posted May 4, 2021 18:27 UTC (Tue) by MattBBaker (guest, #28651)
In reply to: Instant replay: Debugging C and C++ programs with rr (Red Hat Developer) by tux3
Parent article: Instant replay: Debugging C and C++ programs with rr (Red Hat Developer)

How much detail does RR retain? Like, if I step back 10,000 instructions then what will I see from 'info registers'?


to post comments

Instant replay: Debugging C and C++ programs with rr (Red Hat Developer)

Posted May 4, 2021 19:44 UTC (Tue) by bjacob (guest, #58566) [Link]

rr should show you the exact correct values in `info registers` at any time, yet that does not require storing that much information. The basic idea of rr is that most instructions in a program are deterministic, the only non-determinism is localized at relatively few points in the program's execution (typically: I/O). So in order to allow you to rewind back to any point and show the correct values in `info registers`, rr only needs to state from those relatively few non-determinism sources, rewind back to there, then re-play forward from there.

Instant replay: Debugging C and C++ programs with rr (Red Hat Developer)

Posted May 4, 2021 23:50 UTC (Tue) by roc (subscriber, #30627) [Link]

rr replay reproduces the exact memory and register contents* of the recording at every point during program execution.

* There are some very small exceptions in our accelerated syscall interception machinery that are irrelevant in practice.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds