HOME

TheInfoList



OR:

In computing, rr is a
debugging tool A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
for Linux designed to record and replay program execution. During the replay phase, rr provides an enhanced
gdb The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others. History GDB was first written by ...
debugging experience that supports reverse execution. rr was originally developed by
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, w ...
to debug
Mozilla Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current a ...
on commodity hardware and software. rr is now widely used outside Mozilla and capable of debugging software such as
Google Chrome Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macO ...
,
QEMU QEMU is a free and open-source emulator (Quick EMUlator). It emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of g ...
, and
LibreOffice LibreOffice () is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from OpenOffice.org, an open-sourced version of the earlier StarOffice. The LibreOffice suite consi ...
. rr is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, ...
.


Design

During the recording phase, rr records all inputs to a Linux process group from the kernel, as well as nondeterministic CPU effects (such as
rdtsc The Time Stamp Counter (TSC) is a 64-bit register present on all x86 processors since the Pentium. It counts the number of CPU cycles since its reset. The instruction RDTSC returns the TSC in EDX:EAX. In x86-64 mode, RDTSC also clears the upper ...
). These inputs are logged to disk and become the "trace". Once the trace is recorded, it can be replayed as many times as desired and all state will be reproduced exactly. During replay rr will act as a
gdbserver gdbserver is a computer program that makes it possible to remotely debug other programs. Running on the same system as the program to be debugged, it allows the GNU Debugger to connect from another system; that is, only the executable to be debugge ...
providing a gdb experience capable of reverse-execution. Because a bug can be replayed over and over again, rr enables new methods of debugging issues that are very difficult to solve with traditional debuggers. rr's design is documented in the pape
Lightweight User-Space Record And Replay
with more details i
Engineering Record And Replay For Deployability


See also

*
gdb The GNU Debugger (GDB) is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others. History GDB was first written by ...
*
Record and replay debugging Record and replay debugging is the process of recording the execution of a software program so that it may be played back within a debugger to help diagnose and resolve defects. The concept is analogous to the use of a flight data recorder to diagn ...


References


External links

* {{Official website, http://rr-project.org/ Debuggers