Rr

From miki
Revision as of 16:33, 12 February 2020 by Mip (talk | contribs) (Created page with "[https://rr-project.org/ rr] is the '''Record and Replay Framework''', developped by '''Mozilla''', and is a replacement for and powerful enhancement of gdb. == Reference...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

rr is the Record and Replay Framework, developped by Mozilla, and is a replacement for and powerful enhancement of gdb.

References

Install and configuration

On Debian, rr is available as a package:

sudo apt install rr

rr also requires the linux performance analysis package for the current kernel.

# Install linux perf
sudo apt install linux-perf-4.19

# Enable perf for user land (temporary)
sudo sysctl kernel.perf_event_paranoid=0

Example of use

Start recording the application:

rr record my_app

Then replay it with:

rr replay

In case the application fires several processes, we can tell rr to fast-forward until child is forked. First we use rr ps to get the list of recorded processes, then we start rr with -f:

rr ps
rr replay -f 12345

During replay, rr behaves likes gdb, with the usual reverse debugging command. See referenced links for more information.