I want a palindrome debugger

What I really need is a debugger that can run backward: one that keeps an undo list for every write and every jump. It would be slow -- the equivalent of single-stepping the whole program, or having a hardware watchpoint on the entire address space, plus potentially vast memory consumption -- but it would make fixing my current nightmare a no brainer.

Of course, gdb can barely find its ass with both hands, so I'll be over here not holding my breath on that one.

Tags: ,

4 Responses:

  1. candice says:

    and you remind me why I decided that 6 months of being paid to work on X was enough. That would be massively useful in a debugger though.

  2. I think about that off and on. You don't have to keep an entire rewind history if you can step forward from a recent state snapshot. There may be a way of doing this without consuming absurd amounts of storage, it's like a time/space tradeoff. I look at this kind of like automating the process I do by hand when I'm trying to find out what happened at an unknown point in the past of a program's execution.

    But I'm not sure that would help debug your problem, since yours is timing sensitive.

  3. graydon says:

    the ocaml debugger allows time-travel (it's not as hard, in a functional language).
    for C, maybe you could make do with the cause-effect chain isolator in zeller's
    delta debugging tools:


  4. chanson says:

    Not that you want to write such a beast, but I don't think it's as impractical as it seems at first glance.

    A debugger with full rollback/tracing may consume massive amounts of storage, but disk is cheaper than dirt now. ($89 for 80GB according to PriceWatch.)

    And processors are mighty fast. There's a debugging tool for the Macintosh called Spotlight. It's a memory debugger similar to Purify; it instruments an executable to catch every pointer access. It was fast enough for interactive use of the debugged application in 1997. (The days when a 266 MHz G3 or Pentium II was top of the line.)