Undo documentation¶
Your guide to UDB and LiveRecorder
- Version
7.0.0
This documentation explains how to use UDB and LiveRecorder to understand complex code and fix bugs faster.
The UDB time travel debugger allows you to go back to any point in the execution history of a Linux process, including stepping backwards and forwards by individual instructions, source lines, function calls and so on. It can regenerate the complete state of the process at any point in its execution, including information that is destroyed during execution.
LiveRecorder includes:
UDB;
the LiveRecorder library which can be used by any Linux application to give it self-recording capabilities;
the live-record command-line tool which records the execution of a process.
Version History¶
- Release 7.0
The GDB distribution that is bundled with UDB is updated from version 10.2 to 13.2. The new version enables multithreaded symbol loading by default amongst many other fixes and improvements.
Users can now optimise
ioctl
calls without revealing any sensitive hardware information to us, by writing a JSON configuration file with definitions of theioctl
calls that are to be optimised. See Self-service configuration.Symbol files can now be encrypted using the symbol-enc utility included in the UDB release archive and the encrypted symbol files can be loaded into UDB using the existing
symbol-file
command. See Symbol encryption.Version 7.0 provides the first public early-access release of UDB and LiveRecorder for the 64-bit ARM architecture family (AArch64), targeting the Graviton2 CPU as used in AWS EC2.
Session state is now restored when loading a previously-loaded LiveRecorder recording. This includes breakpoint and watchpoint settings, current time and thread information, the
ugo undo
/ugo redo
stack, minimum / maximum time limits, the wall-clock timezone, and signal handling information.The live-record tool supports the new
--record-on
option, which defers recording until execution reaches a specified function, or when the name of the program or any of its descendants matches a specified pattern. See Using the LiveRecorder tool.UDB now uses multiple threads to unpack files when loading recordings saved by UDB and LiveRecorder 7.0. This can reduce the time to load recordings by up to 40%, when the recording contains many large files, and when reading from the disk is fast enough.
- Release 6.12
UDB now uses up to four CPU cores to load event history from recordings, resulting in a performance improvement of between 1.3x and 4x when compared with the previous UDB release.
Recordings made on a machine which has a CPU which supports AVX-512 and uses GLIBC 2.34 or later can now be replayed on a machine with a CPU which does not support AVX-512, provided that certain conditions are met.
The
live-record
tool takes a new--verbose
option, which emits extra information before and after recording.
- Release 6.11
Post Failure Logging can now watch expressions and generate logging statements any time the value of the expression changes.
LiveRecorder and UDB are able to attach to processes that link against recent glibc versions which use Restartable Sequences.
UDB is faster to load recordings of programs with a very large memory footprint or a large number of files with debugging information.
- Release 6.10
Shell behaviour under UDB is aligned with that of GDB, with UDB now supporting shell metacharacters in argument lists when starting applications.
User experience is improved when debugging inline functions, so that UDB now steps more reliably to inline call sites, and from inline call sites into inline functions.
Up to 4x faster reverse execution in freshly-loaded recordings where less than 15% of the maximum event log size was used.
- Release 6.9
New UDB
last
command which jumps to the last time in execution history when the value of a variable or expression was modified.Reduced the time required to load LiveRecorder recordings.
Reverse execution commands in a freshly-loaded LiveRecorder recording are 3-4x faster, due to increased number of snapshots saved in recording files.
- Release 6.8
UDB displays progress indicators for long-running operations when in TUI mode and when using the Time Travel Debug for C/C++ extension for Microsoft Visual Studio Code.
Parallel Search - a performance-enhancement option that makes use of multi-core systems to improve the performance of reverse navigation commands - enabled in UDB by default.
Faster saving and loading of LiveRecorder recordings via LZ4 compression.
- Release 6.7
UDB displays a progress indicator when loading LiveRecorder recordings.
Upgraded the version of Python that is packaged with UDB and that is used by C++ pretty-printers from 3.6 to 3.10.
Dropped support for RHEL & CentOS 6.
- Release 6.6
Parallel Search - a performance-enhancement option that makes use of multi-core systems to improve the performance of reverse navigation commands. The speed-up achieved will depend on how far back in history the command moves; the more history executed, the greater the benefit.
While performing a reverse execution command (including reverse-step, reverse-next and the corresponding Reverse Step Into and Reverse Step Out buttons in Visual Studio Code) UDB will stop the program’s execution if the program hits a breakpoint or watchpoint.
The stepi and reverse-stepi commands now step one instruction forwards or backwards within the current thread. You can also use
reverse-stepi -any-thread
to step back exactly one instruction back in history, potentially switching threads in the process.Documentation on using the Time Travel Debug for C/C++ extension for Microsoft Visual Studio Code is included in the UDB documentation.
Added the delete bookmark command for deleting bookmarks.
- Release 6.5
Time Travel Debug for C/C++ extension for Microsoft Visual Studio Code. Enables UDB’s Time Travel debugging capabilities in Microsoft’s Visual Studio Code editor. Requires UDB 6.5.
Added syntax highlighting for source code displayed by UDB, for instance when stopping at a breakpoint, when invoking the
list
command, or in TUI mode.Added support for debuginfod in UDB. This allows UDB to fetch debug info and source code from debuginfod servers specified with the space-separated environment variable
DEBUGINFOD_URLS
.Reverse commands now uniformly respect the same arguments (repeat count) and context (current frame) as their forwards equivalents.
Upgraded the version of GDB that is packaged with UDB from 9.2 to 10.2. Details of the various bugs that this fixes can be found at GDB News .
Deprecated all commands starting with the
uinfo
,ushow
,uset
anduclear
prefixes in favour of the equivalent GDB prefixes:uinfo
→info
ushow
→show
uset
→set
uclear
→unset
Prefixes which don’t have a GDB equivalent, like
ugo
, were not renamed.
- Release 6.4
Status Prompt: UDB’s prompt displays the status of the debugged program and the progress through its execution history.
Undo/Redo: New UDB commands ugo undo (
uu
) andugo redo
(ur
) support undoing and redoing navigation and time-travel commands.Changed the default UDB event log mode to
circular
. This means that when the event log reaches its maximum size, old events are dropped to make room for new ones, allowing the program to continue running.[Beta] Time Travel Debug for C/C++ extension for Visual Studio Code. Enables UDB’s time travel debugging capabilities in Microsoft’s enormously popular Visual Studio Code (VS Code) editor. Download the extension from Visual Studio Code Marketplace.
Reverse step commands (
reverse-finish
,reverse-next
,reverse-nexti
,reverse-step
,reverse-stepit
,reverse-until
) remain in the same thread and are more consistently performant. Thestepi
andreverse-stepi
commands can still be used to forward or reverse step single instructions while following thread switches.[Experimental] A replay-time option provides 2-6x speedup by exploiting multiple CPU cores when performing reverse navigation commands including
reverse-next
,reverse-finish
andreverse-continue
.
- Release 6.3
Bookmarks that you place when replaying a LiveRecorder recording in UDB are automatically persisted across debugging sessions.
UDB displays a progress indicator when performing a long-running time travel operation.
Further improved the performance of the
reverse-next
command and other reverse operations, and improved the correctness of these operations when debugging highly optimized code.UDB now uses styles and colours in the text printed at startup.
- Release 6.2
Improved performance of reverse operations in a number of situations including long-running operations and operations which stay in the same thread.
Deprecated all command line options starting with
--undodb-
in favour of options without any prefix. Refer to thechangelog.txt
file or product documentation for details.
- Release 6.1
UDB is the new name for UndoDB. Existing
--undodb
command-line options will be retained for 6.x releases.Upgraded the version of GDB that is packaged with UDB from 8.1 to 9.2. New GDB features, such as new commands and styled output, are described at GDB News under the relevant sections.
Upgraded the version of Python that is packaged with UDB and that is used by C++ pretty-printers from 2.7 to 3.6. Python 2 only pretty printers shipped by older supported distros are converted automatically at load time into Python 3.
The Log Jump feature is now enabled for all existing and new UDB and LiveRecorder customers.
- Release 6.0
Support for applications written in the Java language.
Recordings are portable across machines with different CPU microarchitectures. See Recording Portability for details.
Core engine 25%-100% faster than 5.0 on diverse workloads.