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...

The debugged program is at the beginning of recorded history. Start debugging
from here or, to proceed towards the end, use:
continue - to replay from the beginning
ugo end  - to jump straight to the end of history

No more reverse-execution history.
0x00007ff1e3808090 in _start ()
from .../lib/x86_64-linux-gnu/ld-2.27.so
(udb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
Have reached end of recorded history.
0x0000000000400759 in main () at main.c:18
18          *(int*)0=0;
(udb)


It is often the case that you wish to start debugging the loaded recording from the end of the recorded execution history. This can be done using the ugo end command once UndoDB has loaded the recording. For convenience this can also be done by supplying the -e or --goto-end option to uload.

For example:

udb
...UndoDB starts...
...UndoDB starts...

No more reverse-execution history.
0x00007ff1e3808090 in _start ()
from .../lib/x86_64-linux-gnu/ld-2.27.so

Performing "ugo end" to jump to the end of the recording. Press ^C to
interrupt this and go back to the start.

Have reached end of recorded history.
(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...

The debugged program is at the beginning of recorded history. Start debugging
from here or, to proceed towards the end, use:
continue - to replay from the beginning
ugo end  - to jump straight to the end of history

No more reverse-execution history.
0x00007ff1e3808090 in _start ()
from .../lib/x86_64-linux-gnu/ld-2.27.so
(udb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
Have reached end of recorded history.
0x0000000000400759 in main () at main.c:18
18          *(int*)0=0;
(udb)


Use the --undodb-load-goto-end command line option to start debugging the loaded recording from the end of the recorded execution history:

udb --undodb-load-goto-end recording.undo
...UndoDB starts...

No more reverse-execution history.
0x00007ff1e3808090 in _start ()
from .../lib/x86_64-linux-gnu/ld-2.27.so

Performing "ugo end" to jump to the end of the recording. Press ^C to
interrupt this and go back to the start.

Have reached end of recorded history.
(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.)