Using LiveRecorder

LiveRecorder can be used for the following purposes:

  1. recording an application
  2. self-recording of an application
  3. debugging a recording
  4. debugging an application

Recording an application

The easiest way to record an application is to use the live-record tool. This has two modes of operation:

  • starting and recording an application:
$ live-record ./<app name>
  • recording an already running application (process)
$ live-record -p <app pid>

Additional information can be found on Undo's documentation page, as well as in the "How to use live-record scripting for capturing sporadic failures" video tutorial.

Self-recording of an application

An application can record itself by using the LiveRecorder API. After the API is integrated into the application, recording can be started, stopped and saved to disk, using a set of API functions defined in undolr/undolr.h.

Additional information can be found on Undo's documentation page, as well as in the undolr/README file.

Debugging a recording or an application

In order to debug a (Undo) recording, we're going to use the UDB reversible debugger. Before proceeding, there are some criteria that need to be met:

  • the version of UDB we're using needs to be as old as, or newer than that of the Live Recorder used in capturing the recording;
  • the machine on which we're running UDB needs to be compatible with that on which the recording was created (i.e. the instruction set of the target machine needs to be supported by that of the debugging machine).

The process of reverse-debugging using UDB is further described in the video tutorial below.


Debugging a remote application

In order to perform remote debugging, we need to install the udbserver on the target machine, where the application is running. Installing can be as simple as copying the undo-<version> directory to
the target machine, or making it available via a file-sharing mechanism such as NFS (note that the only
required files are the version of udbserver appropriate to your target and the 'key' file).

After the udbserver has been copied to the target machine, the following steps need to be taken, in order to perform remote debugging:

  1. On the target machine, start udbserver, telling it how to run the debuggee:
$ undo-<version>/udbserver_<type> \
--connect-port <port> \
<executable> [<arguments>]
  1.  Run udb on the development host:
$ undo-<version>/udb \
  1. Tell udb to connect to udbserver:

(udb) target remote <ip>:<port>
  1. (Reverse-) Debug as normal, e.g.:
(udb) run
(udb) reverse-finish
(udb) reverse-next
(udb) watch ...
(udb) reverse-continue

More information can be found on Undo's documentation page, as well as in the product's documentation (README file).

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk