jwz - I want a palindrome debugger [entries|archive|friends|userinfo]
jwz

  www.jwz.org
  userinfo
  archive
  rss

Links
[»| [DNA Lounge] [Blog] [iCal] ]
[»| [DNA Lounge Legal Defense Fund] ]
[»| [WebCollage] [LJ WebCollage] ]

I want a palindrome debugger [Wed, 18-Dec-2002 5:29 AM]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|]
[music |Pain Teens -- Bannoy]

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.

linkReply

Comments:
[User Picture]From: [info]candice
Wed, 18-Dec-2002 8:14 AM (UTC)

(Link)

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.
From: [info]grayscalewolf
Thu, 19-Dec-2002 2:23 AM (UTC)

(Link)

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.
[User Picture]From: [info]graydon
Thu, 19-Dec-2002 7:53 AM (UTC)

(Link)

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:

http://www.st.cs.uni-sb.de/dd/
http://www.askigor.org
[User Picture]From: [info]chanson
Thu, 19-Dec-2002 9:57 AM (UTC)

(Link)

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.)