UDB

5 min read Original article ↗

Find and fix C/C++ bugs
in minutes with UDB

The interactive time travel debugger
for Linux C/C++ for debugging live processes

Attach UDB to a running process, record the execution, and replay that execution history to get instant visibility into what the process just did, and why. No more guesswork!

Travel back and forth in the recording to inspect program state at any point in the execution history.

Simply follow the trail from symptom to root cause in a single debug cycle – cutting out the multiple debug iterations and saving you tons of time!

Ideal for quickly debugging all types of bugs – especially the hardest ones which remain unresolved for months, or take days to diagnose including:

  • Race conditions
  • Deadlocks
  • Memory corruptions
  • Segfaults
  • Stack corruptions

Also used for quickly understanding code you didn’t write.

HOW DOES IT WORK?

UDB delivers the full power of a modern debugger with variable and memory inspection, scripting, conditional breakpoints and watchpoints – all available in forward and reverse directions.

UDB CAN BE USED IN 2 WAYS

Attach UDB to a running process

Attach UDB to an existing process using the udb --pid PID command-line option or from the Run menu in VS Code, select Add Configuration, and then C/C++: (UDB) Attach.

Image link

WATCH BELOW HOW IT WORKS

100% compatible with GDB, so no need to learn a new tool – just a handful of new commands.
Also available as a VS Code extension or CLion plugin.

KEY FEATURES

UNDO AI

AGENTIC DEBUGGING

NEW functionality: you can now use the ‘explain’ command in UDB which allows your AI coding assistant to drive the debugger to answer your questions e.g. explain what has gone wrong in this program.

Just set the agent to work by giving it an Undo recording and let it debug the issue for you.

WHAT SOFTWARE ENGINEERS SAY

 Senior Software Engineer, Siemens EDA

When dealing with unfamiliar code, there is a huge productivity benefit in being able to go backwards and forwards over the same section of code until you fully understand what it does.

Rob Thompson

Senior Software Engineer, Siemens EDA

 Senior Engineering Director, High Performance Computing at Altair

Everyone who debugs C/C++ should be using time travel debugging. If you’re not using it, you’re just wasting time.

Brian Janes

Senior Engineering Director, High Performance Computing at Altair

 Senior Software Scientist, IBM CPLEX R&D

UDB has helped us efficiently diagnose numerous challenging issues that would have taken much more time to resolve with GDB or other debuggers that are forward-looking with little or no reversibility.

Ed Klotz

Senior Software Scientist, IBM CPLEX R&D

Software Engineer, XR Trading

We experienced unexpected rejections from the exchange on orders that we have been sending for years—without any software changes on our end. With Undo, it took me just 1 hour to diagnose the issue, allowing us to get a quick workaround and resume trading this product before our competitors were able to act.

Zephaniah Hill

Software Engineer, XR Trading

Simply amazing!

Using UDB, I was able to step backwards in time in the current thread of execution to get to the last known good state. From there, I did a binary search through the intervening time to pinpoint when different pieces of the state changed and uncovered what code was responsible for those changes.

Senior software engineer at a leading database and analytics platform provider

Simply amazing!

 at a global networking provider

I put a watchpoint on the memory pointer and worked backwards towards the root cause. I quickly found where the crash happened and why.

Routing software developer

at a global networking provider

Want unlimited record capabilities, portable recording files, integrations, and capture bugs in production?

UDB is perfect for individual developers.

But if you want unlimited record capabilities, portable recording files to replay any time anywhere, integrations with your CI or test automation suite, or capture bugs in production as well as support for other languages, check out the full Undo Suite for teams.

Image link

COMMON QUESTIONS

UDB runs on most modern Linux distributions and supports both 32 and 64-bit x86 programs. For more details, see the full list of system requirements.

We use binary instrumentation to capture only the bare minimum data required to record execution as efficiently as possible. To keep the overhead low, we don’t translate instructions that don’t require it.

UDB is currently used on some of the world’s most complex software, including heavily multithreaded applications and those using shared memory.

Check out the Docs for the full command set available.

Or download this Quick Ref Guide (PDF easier for printing)

UDB is an interactive time travel debugger used by developers in inner-loop development. UDB is a component of Undo.

Undo provides a team solution by integrating into your CI / System Test / Bug Tracker. In so doing, you can:

  1. Automate recording of test failures
  2. Store recordings for root-cause analysis days or weeks later
  3. Collaborate on recordings across teams for effective asynchronous collaboration (recordings are portable and shareable)
  4. Access the thread fuzzing capability to expose concurrency bugs in multithreaded codebases
  5. Access the multi-process correlation for shared memory functionality

Explore Undo