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: Have reached start of recorded history.
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 specify a recording file when starting UndoDB. When a valid recording is passed as the final command line argument to udb it will automatically be loaded:

udb recording.undo
...UndoDB starts...
udb: Have reached start of recorded history.
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)


The --undodb-load option takes a recording file as an argument and can appear anywhere on the command line to achieve the same effect:

udb --undodb-load recording.undo
...UndoDB starts...
udb: Have reached start of recorded history.
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¶

• Replaying a recording that was created on a different machine requires that the load machine’s CPU supports all the instructions used when the recording was created. (UndoDB will show a warning after loading if it detects CPU differences from the machine that created the recording.)