5 ms·
Review: UndoDB, a reversible debugger
- pron 12y agoThe JVM has a few such reversible/omniscient/recording debuggers. A couple of open-source ones -- http://www.lambdacs.com/debugger/ http://www.lambdacs.com/debugger/, http://pleiad.dcc.uchile.cl/tod/download.html http://pleiad.dcc.uchile.cl/tod/download.html -- and a couple of commercial ones -- http://chrononsystems.com/ http://chrononsystems.com/, https://www.takipi.com/ https://www.takipi.com/ -- the last one is designed to impose very low overhead and run constantly in production. I've used the first (the Omniscient Debugger) quite a few times. It has a query language that allows you to query for events throughout the duration of the program (e.g. 'x is assigned a value > 1 while y < 10'). Unfortunately, it can only record a few seconds of the program (it uses a cyclical in-memory buffer). The other debuggers supposedly record to disk and can record longer durations.
- lemming 12y agoTakipi is actually a little different, since it looks like it just catches errors and records the whole local stack state at the time of the error. Useful, but it's not a full back-in-time debugger. I'm actually interested in adding something like this to Cursive for Clojure code - I'd be interested to see whether immutability results in smaller trace captures. I suspect Clojure would make up for that with much deeper function call stacks. Datomic could be a nice interface for querying the events, too.
- seanmcdirmid 12y agoImmutability would probably make the traces larger since it would be much harder to do delta compression (what has changed since the last check point...uhm...nothing and everything!).
- lemming 12y agoI'm not sure how many of these systems actually use checkpoints - I believe that ODB just records a stream of events. I'm not sure how easy it would be to store events that take advantage of the structural sharing of Clojure's data structures - probably quite tricky.
- seanmcdirmid 12y agoThe one in this post does, it seems.
- justincormack 12y agoI was also quite excited by gdb's reverse debug feature but found it unusably slow.
- stevelaz 12y agoThis looks great! I'll be downloading the trial for sure. I wonder if it'll work with gdbserver for remote target debugging? UndoDB's site says it works for Android, but they mention that it's native Android not remote. Anyone have any experience with that?
- cgdae 12y agoUndoDB comes with its own internal replacement for gdbserver called undodb-server; you can do remote debugging by running undodb-server manually on the target machine and connecting to it from within undodb-gdb. The README has an example. [Disclaimer: i work for Undo.]
- deleted 12y ago[deleted]
- padator 12y agoSeems similar to what ocamldebug does in ocaml (which itself was copied from the SML debugger).
- ganarajpr 12y agoI wish there was a reversible debugger for browsers. Would really love to have something like this ( perhaps something like a time travelling debugger like what elm gives is even better! ). Does anyone know of such a project for the browsers ?
- cheepin 12y agoFrom a previous blog post from someone on the Chrome team (that I cannot find), the debug build is unusable slow. Browsers are monstrously complex[0], and it would have to somehow deal with the complexities of multithreaded execution. Not impossible, but almost assuredly adds a performance overhead to an already slow debug build. [0] The oft sited string allocations per keystroke: https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ https://groups.google.com/a/chromium.org/forum/#!msg/chromiu...
- pm215 12y agoIf you want an actually usably fast Free Software reversible debugger, I recommend giving rr a go (http://rr-project.org/ http://rr-project.org/). It works by record-and-replay, and you can do step-backwards in the replay part. It's not perfect yet, but you can use it for serious work on complex multithreaded programs; I've used it for debugging QEMU bugs. I'm optimistic that this will become part of the standard open source C/C++ development toolkit in the same way that valgrind did.
- k4st 12y agoI use this frequently and it's pretty awesome. The killer combination for me is usually to set a hardware watchpoint, then reverse-continue. This is super useful when you've got a bit of memory corruption (e.g. buffer overflow) but don't know what's causing it.