Saving and loading recordings

When licensed appropriately, UndoDB supports saving and loading recordings of the execution of a process. It can also load recordings produced by Live Recorder.

Saving a recording

You can save a recording from UndoDB using the usave command. This will save the currently executed history of the program’s execution into the recording file so it can loaded later.

For example:

udb <path-to-program>
...UndoDB starts...
(udb) run
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400759 in main () at main.c:18
18          *(int*)0=0;
(udb) usave recording.undo
(udb)

Loading a recording

You can load a recording from UndoDB using the uload command. This will load the history of a program’s execution from the recording file, including any debug symbols, so that it can be replayed.

For example:

udb
...UndoDB starts...
(udb) uload recording.undo
udb: Have reached start of recorded history.
udb: Have loaded Undo Recording:
udb:     recording.undo
udb: Note that the debuggee is currently at the beginning of
udb: the recording. You can use the "continue" command to
udb: run to the end of the recording.
(udb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
udb: Have switched to record mode.
0x0000000000400759 in main () at main.c:18
18          *(int*)0=0;
(udb)

You can also use the --undodb-load command line option to UndoDB to achieve the same effect:

udb --undodb-load recording.undo
...UndoDB starts...
udb: Have reached start of recorded history.
udb: Have loaded Undo Recording:
udb:     recording.undo
udb: Note that the debuggee is currently at the beginning of
udb: the recording. You can use the "continue" command to
udb: run to the end of the recording.
(udb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
udb: Have switched to record mode.
0x0000000000400759 in main () at main.c:18
18          *(int*)0=0;
(udb)

Notes

  • Creating an Undo recording on one machine and loading it into UndoDB on a different machine requires that the load machine has a CPU which supports all of the instructions that were used when the recording was created.
  • Support for saving and loading recordings on Android is currently experimental.