In October, I started working for Undo and, now that I understand our technology better, it’s time to explain what I do.
Undo produces a (closed source) technology which allows to record, rewind and replay Linux programs (on x86 and ARM).
One of our products using this technology is UndoDB, a debugger built on top of gdb which allows you to do everything you do with gdb, but also to go back in time.
Before joining Undo, I mainly used
printfs or similar to debug my code. The main reason is that, when you read logs, it’s easy to jump between different parts of the log and proceed backwards from the point where the bug became apparent to the point where the bug was caused.
On the other hand, with standard gdb, once the bug happens it’s not possible to know what was going on earlier.
UndoDB fixes this problem by allowing the user to go backwards. Every command which moves the program forward has an equivalent reverse command. For instance,
rn for short) which moves to the previous line of code,
rc) which executes backwards until a breakpoint is hit or the start of the program is reached, and so on.
I should point out that UndoDB is not just some kind of fancy logging. You can really jump around in execution history, explore variables and registers at different points in time, bookmark interesting points in history, etc. What you cannot do is change history.
Finally, UndoDB is also useful when gdb wouldn’t be able to show any information. Have you ever seen anything like this in gdb?
Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (udb) backtrace #0 0x0000000000000000 in ?? () #1 0x0000000000000000 in ?? ()
Not very useful, is it?
With UndoDB you can step backwards until you reach a point before your program messed up its state:
(udb) backtrace #0 foo () at program.c:75 #1 0x0000000000400557 in bar (n=42) at program.c:120 #2 0x000000000040056a in main () at program.c:420
In the next post I will give some details on how the technology actually works.
By the way, we are hiring software engineers in Cambridge (UK). If you are interested, contact me.