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 UndoDB reversible debugger. Before proceeding, there are some criteria that need to be met:

  • the version of UndoDB 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 UndoDB 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 UndoDB is further described in the video tutorial below.

 

Debugging a remote application

In order to perform remote debugging, we need to install the undodb-server on the target machine, where the application is running. Installing can be as simple as copying the undodb-<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 undodb-server appropriate to your target and the 'key' file).

Aftger the undodb-server 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 undodb-server, telling it how to run the debuggee:
$ undodb-<version>/undodb-server_<type> \
--connect-port <port> \
<executable> [<arguments>]
  1.  Run udb on the development host:
$ undodb-<version>/udb \
--undodb-gdb-exe <path> \
<executable>
  1. Tell udb to connect to undodb-server:

(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

0 Comments

Please sign in to leave a comment.
Powered by Zendesk