Undo for C/C++/Go/Rust

Your guide to the Undo Suite for C/C++/Go/Rust, including UDB and LiveRecorder

Version:

8.0.1

This documentation explains how to use the Undo Suite to understand complex code and fix bugs faster.

The Undo Suite consists of:

  • the UDB time travel debugger. This 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. When licensed alongside LiveRecorder, UDB also allows saving and time travel debugging of Undo recordings.

  • the LiveRecorder library and live-record tool, which allow you to save the full execution history of a program efficiently in an Undo recording;

Underpinning the above, and central to all Undo technology, is the Undo Engine.

Version History

Release 8.0

In version 8.0 we introduce the following Undo product tiers:

  • UDB is Undo’s Time Travel Debugger, which allows you to debug a live process and replay its execution history to get instant visibility into what your process just did, and why;

  • Undo Team Edition extends the capabilities of UDB with our LiveRecorder tooling, providing an API and command-line tool for recording the execution history of a program and saving it in a recording file for later analysis in UDB;

  • Undo OEM Edition contains the tools from Undo Team Edition and is additionally licensed for recording programs in the field either with LiveRecorder or with a redistributable variant of UDB.

For a more detailed comparison of the three product tiers, see Undo Pricing and Licensing.

Improvements in UDB in release 8.0:

  • usave command enabled for all UDB users. In the 8.0 release, all UDB users are licensed to use the usave command, which saves execution history to a single on-disk recording file for offline analysis. To enable full-featured automated process recording workflows, users should use LiveRecorder which is included in Undo Team Edition.

  • New command to print a timeline of recorded history. Debugging a large application can be disorienting, as you may need to keep a lot of state in your head. The new info timeline command makes this easier by showing key events in recording history.

  • Post Failure Logging in UDB (public beta). Post Failure Logging is now integrated into the UDB debugger. After specifying a probe file using the uexperimental set timeline-probe-file command, Post Failure Logging output will be visible in the output of the UDB timeline. After running the uexperimental set timeline-file command, timeline output will be written to the specified file any time the timeline state changes.

Improvements in Undo Team & OEM Editions in release 8.0:

  • Full support for replaying recordings on a remote replay service. The early access replay service released in version 7.3 is now available for production use. Once a replay service has been deployed in your network, UDB will automatically and transparently replay recordings using the replay service if they cannot be replayed on your local system. To deploy the replay service, please contact us at Undo Support.

  • Feedback-directed Thread Fuzzing (public beta). Release 8.0 introduces Feedback-directed Thread Fuzzing which allows you to capture more race conditions in Undo recordings using live-record --thread-fuzzing-analyze.

  • Multi-process correlation in applications communicating using sockets (public beta). UDB now provides support for following UDP or TCP socket communications between recorded processes. The new uexperimental load-correlation command loads all recordings in a directory and identifies the socket connections between them. The new uexperimental ugo sender command finds the most recent socket receive call in the current recording, locates the corresponding send call in another recording, and goes to that location. Similarly the uexperimental ugo receiver command finds the location where the most recently sent socket data was received.

Release 7.3

In this release, the full collection of Undo tools, including UDB and LiveRecorder, is known as the Undo Suite.

Headline improvements for UDB users:

  • Full support for 64-bit ARM architectures up to ARMv8.2. Improvements since the 7.2 release include support for 64 kB memory pages, improved watchpoint support and improved performance when attaching to programs with a large number of threads. Note that the optional Scalable Vector Extension to ARMv8.2 remains unsupported in this release. To evaluate our ARM product, please contact Undo Support.

Headline improvements for LiveRecorder users:

  • Early-access support for replaying recordings on a remote replay service. UDB will automatically and transparently replay recordings remotely if they cannot be replayed locally. If a replay service is configured, the uload command in UDB will automatically use it when the recording cannot be replayed locally. If you are interested in evaluating the replay service, please contact Undo Support.

  • Improved load time for previously loaded programs or Undo recordings. This is achieved by enabling GDB’s symbol index cache by default. See the relevant GDB documentation for details.

  • The live-record tool accepts the new command-line option --disable-aslr, which disables address-space-layout randomization (ASLR) in the recorded program.

  • A number of issues affecting recording portability have been fixed. Some bugs in the Undo Engine’s emulation of AVX-512 instructions have been addressed and the product now determines more accurately whether recordings are replayable on the current machine.

Release 7.2

Headline improvements in UDB:

  • The new undo command provides a common entry point for all Undo command-line tools and can be invoked with no arguments to print the list of available tools and an explanation of their purpose.

  • UDB sessions can be now be exported and imported using the usession export and usession import commands, allowing session state such as bookmarks and breakpoints to be handed off between developers.

Headline improvements in LiveRecorder:

  • Nondeterministic events are now stored more efficiently in the event log, meaning that the portion of a recording file allocated to the event log will typically be 30% smaller and 50% faster to load, depending on the characteristics of the recorded program.

  • The live-record tool has gained three new capabilities:

    • The --retry-for DURATION option causes live-record to run the program repeatedly to generate a recording until DURATION has expired.

    • The --list option causes live-record to print a list of LiveRecorder sessions that are running on the current system and their corresponding process IDs, allowing sessions to be terminated or discarded more easily.

    • The existing --thread-fuzzing option now adds support for Thread Fuzzing on ARM64 platforms for parity with x86.

Release 7.1

Headline improvements in UDB:

  • UDB now saves the command history from all of your sessions by default. Use the up arrow key (or control-P) to access previously typed commands.

  • After a period of inactivity at the prompt, UDB now provides command suggestions that could enhance your productivity with time travel debugging workflows.

Headline improvements in LiveRecorder:

  • Progress indicators are displayed for recording save operations in UDB and the command-line live-record tool.

  • Recordings of x86-64 applications which use instructions from the Intel SHA instruction set extension (identified by the sha_ni CPU flag) can now be replayed on a machine with a CPU which does not implement those instructions.

  • A new LiveRecorder API function creates point recordings which capture program state at a single point in time. When replaying these recordings, functions in the program can be evaluated in the same way as in a full Undo recording.

  • A new LiveRecorder API function provides the option to save a recording file and stop recording when the event log is full, instead of rotating the circular event log.

For more information on these changes, see the release notes that are included in the docs/release-notes/ directory in your UDB release archive.

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 ioctls without revealing any sensitive hardware information to us, by writing a JSON configuration file with definitions of the ioctls that are to be optimized. See Self-service configuration.

  • Symbol files can now be encrypted using the encryption 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 the Undo Suite 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 Undo recording. This includes breakpoint and watchpoint settings, current time and thread information, the ugo undo and ugo redo stack, minimum and 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 behavior 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 Undo recordings.

  • Reverse execution commands in a freshly-loaded Undo 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 Undo recordings via LZ4 compression.

Release 6.7
  • UDB displays a progress indicator when loading Undo 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 and uclear prefixes in favor of the equivalent GDB prefixes:

    • uinfoinfo

    • ushowshow

    • usetset

    • uclearunset

    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) and ugo 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. The stepi and reverse-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 and reverse-continue.

Release 6.3
  • Bookmarks that you place when replaying an Undo 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 colors 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 favor of options without any prefix. Refer to the changelog.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 Undo 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.