Getting Started with UDB¶
UDB is a Time Travel Debugger created by Undo, which can be used to execute a program, play it forwards and backwards, and analyse its internal state. This is useful for determining the cause of bugs since it is possible to observe all of the program state up to the point of the bug.
UDB can also load recordings of your software created by LiveRecorder.
Launching a program in UDB¶
The following command will launch a program in UDB:
udb <path-to-exe>
...UDB starts...
(udb) run <your-arguments>
You can also use the --args
parameter to specify the arguments on the
command line rather than the debugger prompt:
udb --args <path-to-exe> <your-arguments>
...UDB starts...
(udb) run
Attaching to an existing process¶
Sometimes it’s not possible or convenient to launch a program in UDB; you can attach to an existing process using:
udb --pid=<pid> <path-to-exe>
...UDB starts...
(udb) continue
It’s important to specify the path to the executable so UDB can find the debug symbols corresponding to the process.