Getting Started with UndoDB¶
UndoDB is a reversible 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.
UndoDB can also save and load recordings.
Launching a program in UndoDB¶
The following command will launch a program in UndoDB:
udb <path-to-exe> ...UndoDB 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> ...UndoDB starts... (udb) run
Attaching to an existing process¶
Sometimes it’s not possible or convenient to launch a program in UndoDB; you can attach to an existing process using:
udb --pid=<pid> <path-to-exe> ...UndoDB starts... (udb) continue
It’s important to specify the path to the executable so UndoDB can find the debug symbols corresponding to the process.